Skip to content

Commit

Permalink
make names consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jan 16, 2012
1 parent 47ad405 commit 2250489
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
17 changes: 5 additions & 12 deletions src/idgen.c
Expand Up @@ -238,19 +238,12 @@ Msgtable msgtable[] =
{ "apply", "opApply" },
{ "applyReverse", "opApplyReverse" },

#if 1
// Ranges
{ "Fempty", "empty" },
{ "Fhead", "front" },
{ "Ftoe", "back" },
{ "Fnext", "popFront" },
{ "Fretreat", "popBack" },
#else
{ "Fempty", "empty" },
{ "Fhead", "head" },
{ "Ftoe", "toe" },
{ "Fnext", "next" },
{ "Fretreat", "retreat" },
#endif
{ "Ffront", "front" },
{ "Fback", "back" },
{ "FpopFront", "popFront" },
{ "FpopBack", "popBack" },

{ "adDup", "_adDupT" },
{ "adReverse", "_adReverse" },
Expand Down
4 changes: 2 additions & 2 deletions src/opover.c
Expand Up @@ -1216,7 +1216,7 @@ int ForeachStatement::inferAggregate(Scope *sc, Dsymbol *&sapply)
{
Identifier *idapply = (op == TOKforeach) ? Id::apply : Id::applyReverse;
#if DMDV2
Identifier *idhead = (op == TOKforeach) ? Id::Fhead : Id::Ftoe;
Identifier *idhead = (op == TOKforeach) ? Id::Ffront : Id::Fback;
int sliced = 0;
#endif
Type *tab;
Expand Down Expand Up @@ -1412,7 +1412,7 @@ int ForeachStatement::inferApplyArgTypes(Scope *sc, Dsymbol *&sapply)
{
/* Look for a head() or rear() overload
*/
Identifier *id = (op == TOKforeach) ? Id::Fhead : Id::Ftoe;
Identifier *id = (op == TOKforeach) ? Id::Ffront : Id::Fback;
Dsymbol *s = search_function(ad, id);
FuncDeclaration *fd = s ? s->isFuncDeclaration() : NULL;
if (!fd)
Expand Down
8 changes: 4 additions & 4 deletions src/statement.c
Expand Up @@ -1768,12 +1768,12 @@ Statement *ForeachStatement::semantic(Scope *sc)
Identifier *idhead;
Identifier *idnext;
if (op == TOKforeach)
{ idhead = Id::Fhead;
idnext = Id::Fnext;
{ idhead = Id::Ffront;
idnext = Id::FpopFront;
}
else
{ idhead = Id::Ftoe;
idnext = Id::Fretreat;
{ idhead = Id::Fback;
idnext = Id::FpopBack;
}
Dsymbol *shead = search_function(ad, idhead);
if (!shead)
Expand Down

0 comments on commit 2250489

Please sign in to comment.