Mercurial > projects > ddmd
diff dmd/Module.d @ 128:e6e542f37b94
Some more Array -> Vector conversions
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Sat, 04 Sep 2010 01:33:05 +0100 |
parents | 1765f3ef917d |
children | 010eb8f0e18d |
line wrap: on
line diff
--- a/dmd/Module.d Fri Sep 03 23:55:51 2010 +0100 +++ b/dmd/Module.d Sat Sep 04 01:33:05 2010 +0100 @@ -297,7 +297,7 @@ symfile = new File(symfilename); } - static Module load(Loc loc, Array packages, Identifier ident) + static Module load(Loc loc, Identifiers packages, Identifier ident) { Module m; string filename; @@ -311,13 +311,10 @@ filename = ident.toChars(); if (packages && packages.dim) { - scope OutBuffer buf = new OutBuffer(); - int i; + scope buf = new OutBuffer(); - for (i = 0; i < packages.dim; i++) + foreach (pid; packages) { - Identifier pid = cast(Identifier)packages.data[i]; - buf.writestring(pid.toChars()); version (Windows) { @@ -379,9 +376,8 @@ writef("import "); if (packages) { - for (size_t i = 0; i < packages.dim; i++) + foreach (pid; packages) { - Identifier pid = cast(Identifier)packages.data[i]; writef("%s.", pid.toChars()); } }