diff dmd/StructDeclaration.d @ 85:8e69d041a99d

Previous commit didn't compile. Fixed.
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 30 Aug 2010 16:16:30 +0100
parents be2ab491772e
children 23280d154c5b
line wrap: on
line diff
--- a/dmd/StructDeclaration.d	Mon Aug 30 16:12:19 2010 +0100
+++ b/dmd/StructDeclaration.d	Mon Aug 30 16:16:30 2010 +0100
@@ -322,9 +322,8 @@
 
 		// Determine if struct is all zeros or not
 		zeroInit = true;
-		foreach (Dsymbol s; fields)
+		foreach (VarDeclaration vd; fields)
 		{
-			VarDeclaration vd = s.isVarDeclaration();
 			if (vd && !vd.isDataseg())
 			{
 				if (vd.init)
@@ -395,9 +394,8 @@
 		/* If any of the fields need an opAssign, then we
 		 * need it too.
 		 */
-		foreach (Dsymbol s; fields)
+		foreach (VarDeclaration v; fields)
 		{
-			VarDeclaration v = s.isVarDeclaration();
 			assert(v && v.storage_class & STC.STCfield);
 			if (v.storage_class & STC.STCref)
 				continue;
@@ -498,9 +496,8 @@
 		{	/* Do memberwise copy
 			 */
 		//printf("\tmemberwise copy\n");
-		foreach (Dsymbol s; fields)
+		foreach (VarDeclaration v; fields)
 		{
-			VarDeclaration v = s.isVarDeclaration();
 			assert(v && v.storage_class & STC.STCfield);
 			// this.v = s.v;
 			AssignExp ec = new AssignExp(Loc(0), new DotVarExp(Loc(0), new ThisExp(Loc(0)), v, 0), new DotVarExp(Loc(0), new IdentifierExp(Loc(0), Id.p), v, 0));
@@ -548,9 +545,8 @@
 		//printf("StructDeclaration.buildPostBlit() %s\n", toChars());
 		Expression e = null;
 
-		foreach (Dsymbol s; fields)
+		foreach (VarDeclaration v; fields)
 		{
-			VarDeclaration v = s.isVarDeclaration();
 			assert(v && v.storage_class & STC.STCfield);
 			if (v.storage_class & STC.STCref)
 				continue;