Zebediah Figura : d3dcompiler: Remove redundant components_count_expr_list () function.

Alexandre Julliard julliard at winehq.org
Fri Aug 9 14:49:32 CDT 2019


Module: wine
Branch: master
Commit: 79b7828894caed586215768b21bf2f165022a6b7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=79b7828894caed586215768b21bf2f165022a6b7

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Fri Aug  9 09:52:46 2019 -0500

d3dcompiler: Remove redundant components_count_expr_list() function.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dcompiler_43/hlsl.y | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index 0f98190..c18efcc 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -387,19 +387,7 @@ static unsigned int initializer_size(struct list *initializer)
     {
         count += components_count_type(node->data_type);
     }
-    TRACE("Initializer size = %u\n", count);
-    return count;
-}
-
-static unsigned int components_count_expr_list(struct list *list)
-{
-    struct hlsl_ir_node *node;
-    unsigned int count = 0;
-
-    LIST_FOR_EACH_ENTRY(node, list, struct hlsl_ir_node, entry)
-    {
-        count += components_count_type(node->data_type);
-    }
+    TRACE("Initializer size = %u.\n", count);
     return count;
 }
 
@@ -2109,7 +2097,7 @@ postfix_expr:             primary_expr
                                     set_parse_status(&hlsl_ctx.status, PARSE_ERR);
                                     return -1;
                                 }
-                                if ($2->dimx * $2->dimy != components_count_expr_list($4))
+                                if ($2->dimx * $2->dimy != initializer_size($4))
                                 {
                                     hlsl_message("Line %u: wrong number of components in constructor.\n",
                                             hlsl_ctx.line_no);




More information about the wine-cvs mailing list