diff dmd/Parser.d @ 77:ad4792a1cfd6

more D-ification container accessing
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Sun, 29 Aug 2010 14:36:55 +0100
parents 7e0d548de9e6
children 43073c7c7769
line wrap: on
line diff
--- a/dmd/Parser.d	Sun Aug 29 09:43:40 2010 +0100
+++ b/dmd/Parser.d	Sun Aug 29 14:36:55 2010 +0100
@@ -3218,9 +3218,8 @@
 			{
 			Statements as = new Statements();
 			as.reserve(a.dim);
-			for (int i = 0; i < a.dim; i++)
+			foreach(Dsymbol d; a)
 			{
-				Dsymbol d = cast(Dsymbol)a.data[i];
 				s = new DeclarationStatement(loc, d);
 				as.push(cast(void*)s);
 			}
@@ -3228,7 +3227,7 @@
 			}
 			else if (a.dim == 1)
 			{
-				Dsymbol d = cast(Dsymbol)a.data[0];
+				auto d = a[0];
 			s = new DeclarationStatement(loc, d);
 			}
 			else