Mercurial > projects > ddmd
diff dmd/InterfaceDeclaration.d @ 77:ad4792a1cfd6
more D-ification container accessing
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Sun, 29 Aug 2010 14:36:55 +0100 |
parents | 2e2a5c3f943a |
children | b17640f0e4e8 |
line wrap: on
line diff
--- a/dmd/InterfaceDeclaration.d Sun Aug 29 09:43:40 2010 +0100 +++ b/dmd/InterfaceDeclaration.d Sun Aug 29 14:36:55 2010 +0100 @@ -222,11 +222,8 @@ protection = sc.protection; storage_class |= sc.stc & STC.STC_TYPECTOR; - for (i = 0; i < members.dim; i++) - { - Dsymbol s = cast(Dsymbol)members.data[i]; + foreach(Dsymbol s; members) s.addMember(sc, this, true); - } sc = sc.push(this); sc.stc &= ~(STC.STCfinal | STC.STCauto | STC.STCscope | STC.STCstatic | @@ -241,11 +238,8 @@ structalign = sc.structalign; sc.offset = PTRSIZE * 2; inuse++; - for (i = 0; i < members.dim; i++) - { - Dsymbol s = cast(Dsymbol)members.data[i]; + foreach(Dsymbol s; members) s.semantic(sc); - } inuse--; //members.print(); sc.pop(); @@ -368,11 +362,8 @@ scclass = SCcomdat; // Put out the members - for (i = 0; i < members.dim; i++) + foreach(Dsymbol member; members) { - Dsymbol member; - - member = cast(Dsymbol)members.data[i]; if (!member.isFuncDeclaration()) member.toObjFile(0); }