comparison dmd/TypeSlice.d @ 113:3482c73a991b

More cleanup for arrays
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Tue, 31 Aug 2010 23:57:32 +0100
parents 2e2a5c3f943a
children e28b18c23469
comparison
equal deleted inserted replaced
112:3f02152c5e68 113:3482c73a991b
133 } 133 }
134 134
135 /* Create a new TupleDeclaration which 135 /* Create a new TupleDeclaration which
136 * is a slice [i1..i2] out of the old one. 136 * is a slice [i1..i2] out of the old one.
137 */ 137 */
138 Objects objects = new Objects; 138 auto objects = new Objects;
139 objects.setDim(cast(uint)(i2 - i1)); 139 objects.setDim(cast(uint)(i2 - i1));
140 for (size_t i = 0; i < objects.dim; i++) 140 for (size_t i = 0; i < objects.dim; i++)
141 { 141 {
142 objects.data[i] = td.objects.data[cast(size_t)i1 + i]; 142 objects[i] = td.objects[cast(size_t)i1 + i];
143 } 143 }
144 144
145 TupleDeclaration tds = new TupleDeclaration(loc, td.ident, objects); 145 auto tds = new TupleDeclaration(loc, td.ident, objects);
146 *ps = tds; 146 *ps = tds;
147 } 147 }
148 else 148 else
149 goto Ldefault; 149 goto Ldefault;
150 } 150 }