diff dmd/ForeachStatement.d @ 84:be2ab491772e

Expressions -> Vector!Expression
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 30 Aug 2010 16:12:19 +0100
parents ef02e2e203c2
children 39648eb578f6
line wrap: on
line diff
--- a/dmd/ForeachStatement.d	Mon Aug 30 18:42:04 2010 +0400
+++ b/dmd/ForeachStatement.d	Mon Aug 30 16:12:19 2010 +0100
@@ -624,12 +624,12 @@
 						fdapply = FuncDeclaration.genCfunc(Type.tindex, "_aaApply");
 
 					ec = new VarExp(Loc(0), fdapply);
-					Expressions exps = new Expressions();
-					exps.push(cast(void*)aggr);
+					auto exps = new Expressions();
+					exps.push(aggr);
 					size_t keysize = cast(uint)taa.index.size();
 					keysize = (keysize + (PTRSIZE-1)) & ~(PTRSIZE-1);
-					exps.push(cast(void*)new IntegerExp(Loc(0), keysize, Type.tsize_t));
-					exps.push(cast(void*)flde);
+					exps.push(new IntegerExp(Loc(0), keysize, Type.tsize_t));
+					exps.push(flde);
 					e = new CallExp(loc, ec, exps);
 					e.type = Type.tindex;	// don't run semantic() on e
 				}
@@ -664,11 +664,11 @@
 					fdapply = FuncDeclaration.genCfunc(Type.tindex, fdname[0..j].idup);
 
 					ec = new VarExp(Loc(0), fdapply);
-					Expressions exps = new Expressions();
+					auto exps = new Expressions();
 					if (tab.ty == TY.Tsarray)
 					   aggr = aggr.castTo(sc, tn.arrayOf());
-					exps.push(cast(void*)aggr);
-					exps.push(cast(void*)flde);
+					exps.push(aggr);
+					exps.push(flde);
 					e = new CallExp(loc, ec, exps);
 					e.type = Type.tindex;	// don't run semantic() on e
 				}
@@ -677,8 +677,8 @@
 					/* Call:
 					 *	aggr(flde)
 					 */
-					Expressions exps = new Expressions();
-					exps.push(cast(void*)flde);
+					auto exps = new Expressions();
+					exps.push(flde);
 					e = new CallExp(loc, aggr, exps);
 					e = e.semantic(sc);
 					if (e.type != Type.tint32)
@@ -714,7 +714,7 @@
 					}
 } else {
 					ec = new DotIdExp(loc, aggr, idapply);
-					exps.push(cast(void*)flde);
+					exps.push(flde);
 }
 					e = new CallExp(loc, ec, exps);
 					e = e.semantic(sc);