summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2016-10-20 20:47:54 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2016-10-30 15:12:02 +0100
commit7d01cf8e335fb2a5accdd3b69914a649803a80bc (patch)
tree531f19b0c845565519224f5530d7f9416adc73e9
parent1975db0295138ffedf172af77cc9f16d74cbcdea (diff)
downloadvala-7d01cf8e335fb2a5accdd3b69914a649803a80bc.tar.gz
codegen: Drop superfluous dynamic-type cast
-rw-r--r--codegen/valaccodebasemodule.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index dbacd3cbb..257ce7110 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -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);