Mercurial > projects > ddmd
comparison dmd/IsExp.d @ 126:1765f3ef917d
ClassDeclarations, Arguments -> Vector
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Fri, 03 Sep 2010 23:25:55 +0100 |
parents | 767a01c2a272 |
children | 60bb0fe4563e |
comparison
equal
deleted
inserted
replaced
125:767a01c2a272 | 126:1765f3ef917d |
---|---|
162 // If class or interface, get the base class and interfaces | 162 // If class or interface, get the base class and interfaces |
163 if (targ.ty != Tclass) | 163 if (targ.ty != Tclass) |
164 goto Lno; | 164 goto Lno; |
165 else | 165 else |
166 { ClassDeclaration cd = (cast(TypeClass)targ).sym; | 166 { ClassDeclaration cd = (cast(TypeClass)targ).sym; |
167 Arguments args = new Arguments; | 167 auto args = new Arguments; |
168 args.reserve(cd.baseclasses.dim); | 168 args.reserve(cd.baseclasses.dim); |
169 foreach (b; cd.baseclasses) | 169 foreach (b; cd.baseclasses) |
170 { | 170 { |
171 args.push(cast(void*)new Argument(STCin, b.type, null, null)); | 171 args.push(new Argument(STCin, b.type, null, null)); |
172 } | 172 } |
173 tded = new TypeTuple(args); | 173 tded = new TypeTuple(args); |
174 } | 174 } |
175 break; | 175 break; |
176 | 176 |
199 size_t dim = Argument.dim(params); | 199 size_t dim = Argument.dim(params); |
200 Arguments args = new Arguments; | 200 Arguments args = new Arguments; |
201 args.reserve(dim); | 201 args.reserve(dim); |
202 for (size_t i = 0; i < dim; i++) | 202 for (size_t i = 0; i < dim; i++) |
203 { | 203 { |
204 Argument arg = Argument.getNth(params, i); | 204 auto arg = Argument.getNth(params, i); |
205 assert(arg && arg.type); | 205 assert(arg && arg.type); |
206 args.push(cast(void*)new Argument(arg.storageClass, arg.type, null, null)); | 206 args.push(new Argument(arg.storageClass, arg.type, null, null)); |
207 } | 207 } |
208 tded = new TypeTuple(args); | 208 tded = new TypeTuple(args); |
209 break; | 209 break; |
210 } | 210 } |
211 | 211 |