]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Drop superfluous dynamic-type cast
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 20 Oct 2016 18:47:54 +0000 (20:47 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 30 Oct 2016 14:12:02 +0000 (15:12 +0100)
codegen/valaccodebasemodule.vala

index dbacd3cbb8a1581ed215888c8da3a84369ed4094..257ce71109a4317c829ed62263464af30633ac2b 100644 (file)
@@ -5353,7 +5353,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                        make_comparable_cexpression (ref left_type, ref cleft, ref right_type, ref cright);
 
                        if (left_type is StructValueType && right_type is StructValueType) {
-                               var equalfunc = generate_struct_equal_function ((Struct) left_type.data_type as Struct);
+                               var equalfunc = generate_struct_equal_function ((Struct) left_type.data_type);
                                var ccall = new CCodeFunctionCall (new CCodeIdentifier (equalfunc));
                                ccall.add_argument (cleft);
                                ccall.add_argument (cright);
@@ -5489,7 +5489,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                        ccall.add_argument (cneedle);
                        cif_condition = new CCodeBinaryExpression (CCodeBinaryOperator.EQUALITY, ccall, new CCodeConstant ("0"));
                } else if (array_type.element_type is StructValueType) {
-                       var equalfunc = generate_struct_equal_function ((Struct) array_type.element_type.data_type as Struct);
+                       var equalfunc = generate_struct_equal_function ((Struct) array_type.element_type.data_type);
                        var ccall = new CCodeFunctionCall (new CCodeIdentifier (equalfunc));
                        ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, celement));
                        ccall.add_argument (cneedle);