diff dmd/FuncDeclaration.d @ 122:c77e9f4f1793

Statements -> Vector
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Thu, 02 Sep 2010 23:37:49 +0100
parents e28b18c23469
children 1765f3ef917d
line wrap: on
line diff
--- a/dmd/FuncDeclaration.d	Thu Sep 02 22:41:12 2010 +0100
+++ b/dmd/FuncDeclaration.d	Thu Sep 02 23:37:49 2010 +0100
@@ -1431,7 +1431,7 @@
 		}
 
 		{
-			Statements a = new Statements();
+			auto a = new Statements();
 
 			// Merge in initialization of 'out' parameters
 			if (parameters)
@@ -1443,7 +1443,7 @@
 				assert(v.init);
 				ExpInitializer ie = v.init.isExpInitializer();
 				assert(ie);
-				a.push(cast(void*)new ExpStatement(Loc(0), ie.exp));
+				a.push(new ExpStatement(Loc(0), ie.exp));
 				}
 			}
 			}
@@ -1473,7 +1473,7 @@
 				Expression e = new SymOffExp(Loc(0), p, offset);
 				e = new AssignExp(Loc(0), e1, e);
 				e.type = t;
-				a.push(cast(void*)new ExpStatement(Loc(0), e));
+				a.push(new ExpStatement(Loc(0), e));
 				p.isargptr = true;
 }
 			}
@@ -1489,7 +1489,7 @@
 			e = new AssignExp(Loc(0), e1, e);
 			e.op = TOK.TOKconstruct;
 			e = e.semantic(sc2);
-			a.push(cast(void*)new ExpStatement(Loc(0), e));
+			a.push(new ExpStatement(Loc(0), e));
 			}
 
 			// Merge contracts together with body into one compound statement
@@ -1501,7 +1501,7 @@
 			}
 } else {
 			if (frequire && global.params.useIn)
-			a.push(cast(void*)frequire);
+			a.push(frequire);
 }
 
 			// Precondition invariant
@@ -1543,17 +1543,17 @@
 			}
 			if (e)
 			{
-				ExpStatement s = new ExpStatement(Loc(0), e);
-				a.push(cast(void*)s);
+				auto s = new ExpStatement(Loc(0), e);
+				a.push(s);
 			}
 			}
 
 			if (fbody)
-			a.push(cast(void*)fbody);
+			a.push(fbody);
 
 			if (fensure)
 			{
-			a.push(cast(void*)returnLabel.statement);
+			a.push(returnLabel.statement);
 
 			if (type.nextOf().ty != TY.Tvoid)
 			{
@@ -1564,8 +1564,8 @@
 				{	e = e.implicitCastTo(sc, tintro.nextOf());
 				e = e.semantic(sc);
 				}
-				ReturnStatement s = new ReturnStatement(Loc(0), e);
-				a.push(cast(void*)s);
+				auto s = new ReturnStatement(Loc(0), e);
+				a.push(s);
 			}
 			}