diff dmd/TypeSArray.d @ 94:3a0b150c9841

Objects -> Vector!Object iteration 1
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 30 Aug 2010 23:00:34 +0100
parents 2e2a5c3f943a
children 12c0c84d13fd
line wrap: on
line diff
--- a/dmd/TypeSArray.d	Mon Aug 30 22:50:30 2010 +0200
+++ b/dmd/TypeSArray.d	Mon Aug 30 23:00:34 2010 +0100
@@ -272,11 +272,11 @@
 				 * Do it this way because TemplateInstance.semanticTiargs()
 				 * can handle unresolved Objects this way.
 				 */
-				Objects objects = new Objects;
+				auto objects = new Objects;
 				objects.setDim(1);
-				objects.data[0] = cast(void*)o;
+				objects[0] = o;
 
-				TupleDeclaration tds = new TupleDeclaration(loc, td.ident, objects);
+				auto tds = new TupleDeclaration(loc, td.ident, objects);
 				*ps = tds;
 			}
 			else
@@ -523,7 +523,7 @@
 						MATCH m = cast(MATCH)dim.implicitConvTo(vt);
 						if (!m)
 							goto Lnomatch;
-						dedtypes.data[i] = cast(void*)dim;
+						dedtypes[i] = dim;
 					}
 				}
 				else if (dim.toInteger() != tp.dim.toInteger())
@@ -531,10 +531,10 @@
 			}
 			else if (tparam.ty == Taarray)
 			{
-				TypeAArray tp = cast(TypeAArray)tparam;
+				auto tp = cast(TypeAArray)tparam;
 				if (tp.index.ty == Tident)
 				{	
-					TypeIdentifier tident = cast(TypeIdentifier)tp.index;
+					auto tident = cast(TypeIdentifier)tp.index;
 
 					if (tident.idents.dim == 0)
 					{   
@@ -542,7 +542,7 @@
 
 						for (size_t i = 0; i < parameters.dim; i++)
 						{
-							TemplateParameter tp2 = cast(TemplateParameter)parameters.data[i];
+							auto tp2 = cast(TemplateParameter)parameters.data[i];
 
 							if (tp2.ident.equals(id))
 							{   
@@ -557,7 +557,7 @@
 										goto Lnomatch;
 								}
 								else
-								{	dedtypes.data[i] = cast(void*)dim;
+								{	dedtypes[i] = dim;
 								}
 								return next.deduceType(sc, tparam.nextOf(), parameters, dedtypes);
 							}