Mercurial > projects > ddmd
diff dmd/StructDeclaration.d @ 126:1765f3ef917d
ClassDeclarations, Arguments -> Vector
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Fri, 03 Sep 2010 23:25:55 +0100 |
parents | e28b18c23469 |
children | 010eb8f0e18d |
line wrap: on
line diff
--- a/dmd/StructDeclaration.d Fri Sep 03 22:17:54 2010 +0100 +++ b/dmd/StructDeclaration.d Fri Sep 03 23:25:55 2010 +0100 @@ -231,20 +231,20 @@ TypeFunction tfeqptr; { - Arguments arguments = new Arguments; - Argument arg = new Argument(STC.STCin, handle, Id.p, null); + auto arguments = new Arguments; + auto arg = new Argument(STC.STCin, handle, Id.p, null); - arguments.push(cast(void*)arg); + arguments.push(arg); tfeqptr = new TypeFunction(arguments, Type.tint32, 0, LINK.LINKd); tfeqptr = cast(TypeFunction)tfeqptr.semantic(Loc(0), sc); } TypeFunction tfeq; { - Arguments arguments = new Arguments; - Argument arg = new Argument(STC.STCin, type, null, null); + auto arguments = new Arguments; + auto arg = new Argument(STC.STCin, type, null, null); - arguments.push(cast(void*)arg); + arguments.push(arg); tfeq = new TypeFunction(arguments, Type.tint32, 0, LINK.LINKd); tfeq = cast(TypeFunction)tfeq.semantic(Loc(0), sc); } @@ -437,9 +437,9 @@ FuncDeclaration fop = null; - Argument param = new Argument(STC.STCnodtor, type, Id.p, null); - Arguments fparams = new Arguments; - fparams.push(cast(void*)param); + auto param = new Argument(STC.STCnodtor, type, Id.p, null); + auto fparams = new Arguments; + fparams.push(param); Type ftype = new TypeFunction(fparams, handle, false, LINK.LINKd); version (STRUCTTHISREF) { (cast(TypeFunction)ftype).isref = 1; @@ -652,9 +652,9 @@ { //printf("generating cpctor\n"); - Argument param = new Argument(STC.STCref, type, Id.p, null); - Arguments fparams = new Arguments; - fparams.push(cast(void*)param); + auto param = new Argument(STC.STCref, type, Id.p, null); + auto fparams = new Arguments; + fparams.push(param); Type ftype = new TypeFunction(fparams, Type.tvoid, false, LINK.LINKd); fcp = new FuncDeclaration(Loc(0), Loc(0), Id.cpctor, STC.STCundefined, ftype); @@ -665,7 +665,7 @@ } else { e = new PtrExp(Loc(0), e); } - AssignExp ea = new AssignExp(Loc(0), e, new IdentifierExp(Loc(0), Id.p)); + auto ea = new AssignExp(Loc(0), e, new IdentifierExp(Loc(0), Id.p)); ea.op = TOK.TOKblit; Statement s = new ExpStatement(Loc(0), ea);