diff dmd/StructDeclaration.d @ 74:7e0d548de9e6

Switch Arrays of Dsymbols to the new templated Vector type
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Sun, 29 Aug 2010 09:43:40 +0100
parents 2e2a5c3f943a
children ad4792a1cfd6
line wrap: on
line diff
--- a/dmd/StructDeclaration.d	Sat Aug 28 19:42:41 2010 +0400
+++ b/dmd/StructDeclaration.d	Sun Aug 29 09:43:40 2010 +0100
@@ -186,7 +186,7 @@
 						assert(!vthis);
 						vthis = new ThisDeclaration(loc, t);
 				//vthis.storage_class |= STC.STCref;
-						members.push(cast(void*)vthis);
+						members.push(vthis);
 					}
 				}
 			}
@@ -272,7 +272,7 @@
 					fdptr.fbody = new ReturnStatement(loc, e);
 					ScopeDsymbol ss = fdx.parent.isScopeDsymbol();
 					assert(ss);
-					ss.members.push(cast(void*)fdptr);
+					ss.members.push(fdptr);
 					fdptr.addMember(sc, ss, true);
 					fdptr.semantic(sc2);
 				}
@@ -523,7 +523,7 @@
 
 		fop.fbody = new CompoundStatement(Loc(0), s1, s2);
 
-		members.push(cast(void*)fop);
+		members.push(fop);
 		fop.addMember(sc, this, true);
 
 		sc = sc.push();
@@ -602,10 +602,10 @@
 		 */
 		if (e)
 		{	//printf("Building __fieldPostBlit()\n");
-		PostBlitDeclaration dd = new PostBlitDeclaration(Loc(0), Loc(0), Lexer.idPool("__fieldPostBlit"));
+		auto dd = new PostBlitDeclaration(Loc(0), Loc(0), Lexer.idPool("__fieldPostBlit"));
 		dd.fbody = new ExpStatement(Loc(0), e);
-		postblits.shift(cast(void*)dd);
-		members.push(cast(void*)dd);
+		postblits.shift(dd);
+		members.push(dd);
 		dd.semantic(sc);
 		}
 
@@ -626,9 +626,9 @@
 			ex = new CallExp(Loc(0), ex);
 			e = Expression.combine(e, ex);
 			}
-			PostBlitDeclaration dd = new PostBlitDeclaration(Loc(0), Loc(0), Lexer.idPool("__aggrPostBlit"));
+			auto dd = new PostBlitDeclaration(Loc(0), Loc(0), Lexer.idPool("__aggrPostBlit"));
 			dd.fbody = new ExpStatement(Loc(0), e);
-			members.push(cast(void*)dd);
+			members.push(dd);
 			dd.semantic(sc);
 			return dd;
 		}
@@ -686,7 +686,7 @@
 		s = new CompoundStatement(Loc(0), s, new ExpStatement(Loc(0), e));
 		fcp.fbody = s;
 
-		members.push(cast(void*)fcp);
+		members.push(fcp);
 
 		sc = sc.push();
 		sc.stc = STC.STCundefined;