diff dmd/expression/Util.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/expression/Util.d	Fri Sep 03 22:17:54 2010 +0100
+++ b/dmd/expression/Util.d	Fri Sep 03 23:25:55 2010 +0100
@@ -952,12 +952,12 @@
 
 	/* Create the TypeTuple corresponding to the types of args[]
 	 */
-	Arguments args = new Arguments;
+	auto args = new Arguments;
 	args.setDim(dim);
 	for (size_t i = 0; i < dim; i++)
 	{	
-		Argument arg = new Argument(STCin, exps[i].type, null, null);
-		args.data[i] = cast(void*)arg;
+		auto arg = new Argument(STCin, exps[i].type, null, null);
+		args[i] = arg;
 	}
 	TypeTuple tup = new TypeTuple(args);
 	Expression e = tup.getTypeInfo(sc);
@@ -1284,14 +1284,14 @@
 		if (u == arguments.dim)
 			return;
 
-		Argument arg = cast(Argument)arguments.data[u];
+		auto arg = arguments[u];
 		if (!arg.type)
 			break;
     }
 
     AggregateDeclaration ad;
 
-    Argument arg = cast(Argument)arguments.data[0];
+    auto arg = arguments[0];
     Type taggr = aggr.type;
     if (!taggr)
 		return;
@@ -1305,7 +1305,7 @@
 			{
 				if (!arg.type)
 					arg.type = Type.tsize_t;	// key type
-				arg = cast(Argument)arguments.data[1];
+				arg = arguments[1];
 			}
 			if (!arg.type && tab.ty != TY.Ttuple)
 				arg.type = tab.nextOf();	// value type
@@ -1319,7 +1319,7 @@
 			{
 				if (!arg.type)
 					arg.type = taa.index;	// key type
-				arg = cast(Argument)arguments.data[1];
+				arg = arguments[1];
 			}
 			if (!arg.type)
 				arg.type = taa.next;		// value type
@@ -1465,7 +1465,7 @@
 
     for (size_t u = 0; u < nparams; u++)
     {
-		Argument arg = cast(Argument)arguments.data[u];
+		auto arg = arguments[u];
 		Argument param = Argument.getNth(tf.parameters, u);
 		if (arg.type)
 		{