diff dmd/SliceExp.d @ 84:be2ab491772e

Expressions -> Vector!Expression
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 30 Aug 2010 16:12:19 +0100
parents 2e2a5c3f943a
children e28b18c23469
line wrap: on
line diff
--- a/dmd/SliceExp.d	Mon Aug 30 18:42:04 2010 +0400
+++ b/dmd/SliceExp.d	Mon Aug 30 16:12:19 2010 +0100
@@ -211,12 +211,12 @@
 
 				if (e1.op == TOKtuple)
 				{	
-					Expressions exps = new Expressions;
+					auto exps = new Expressions;
 					exps.setDim(j2 - j1);
 					for (size_t i = 0; i < j2 - j1; i++)
 					{   
-						Expression e2 = cast(Expression)te.exps.data[j1 + i];
-						exps.data[i] = cast(void*)e2;
+						auto e2 = te.exps[j1 + i];
+						exps[i] = e2;
 					}
 					e = new TupleExp(loc, exps);
 				}
@@ -505,7 +505,7 @@
 	override void buildArrayIdent(OutBuffer buf, Expressions arguments)
 	{
 		buf.writestring("Slice");
-		arguments.shift(cast(void*)this);
+		arguments.shift(this);
 	}
 
 	override Expression buildArrayLoop(Arguments fparams)
@@ -516,7 +516,7 @@
 		Expression e = new IdentifierExp(Loc(0), id);
 		Expressions arguments = new Expressions();
 		Expression index = new IdentifierExp(Loc(0), Id.p);
-		arguments.push(cast(void*)index);
+		arguments.push(index);
 		e = new ArrayExp(Loc(0), e, arguments);
 		return e;
 	}