Skip to content

Commit

Permalink
Refactor: Updated DENG2_FOR_EACH macro usage
Browse files Browse the repository at this point in the history
The parameters have been revised to make these slightly less verbose.
  • Loading branch information
skyjake committed Oct 8, 2012
1 parent c64ff63 commit cbe5571
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/lumpcache.h
Expand Up @@ -185,7 +185,7 @@ class LumpCache
{
if(dataCache)
{
DENG2_FOR_EACH(i, *dataCache, DataCache::iterator)
DENG2_FOR_EACH(DataCache, i, *dataCache)
{
i->clearData();
}
Expand Down
8 changes: 4 additions & 4 deletions doomsday/engine/portable/src/fs_main.cpp
Expand Up @@ -1194,7 +1194,7 @@ static ddstring_t* composeFileList(FileList* fl, int flags = DEFAULT_PATHTOSTRIN

// Determine the maximum number of characters we'll need.
maxLength = 0;
DENG2_FOR_EACH(i, *fl, FileList::const_iterator)
DENG2_FOR_EACH_CONST(FileList, i, *fl)
{
if(predicate && !predicate(*i, parameters))
continue; // Caller isn't interested in this...
Expand Down Expand Up @@ -1253,7 +1253,7 @@ static ddstring_t* composeFileList(FileList* fl, int flags = DEFAULT_PATHTOSTRIN
str = Str_New();
Str_Reserve(str, maxLength);
n = 0;
DENG2_FOR_EACH(i, *fl, FileList::const_iterator)
DENG2_FOR_EACH_CONST(FileList, i, *fl)
{
if(predicate && !predicate(*i, parameters))
continue; // Caller isn't interested in this...
Expand Down Expand Up @@ -1508,7 +1508,7 @@ int F_AllResourcePaths2(char const* rawSearchPattern, int flags,
PathMap patternMap;
PathMap_Initialize(&patternMap, de::PathDirectory::hashPathFragment, Str_Text(&searchPattern));

DENG2_FOR_EACH(i, zipLumpDirectory->lumps(), LumpDirectory::LumpInfos::const_iterator)
DENG2_FOR_EACH_CONST(LumpDirectory::LumpInfos, i, zipLumpDirectory->lumps())
{
LumpInfo const* lumpInfo = *i;
de::PathDirectoryNode* node = reinterpret_cast<de::PathDirectoryNode*>(F_LumpDirectoryNode(lumpInfo->container, lumpInfo->lumpIdx));
Expand Down Expand Up @@ -2481,7 +2481,7 @@ static void printLumpDirectory(LumpDirectory& ld)
Con_Printf("LumpDirectory %p (%i records):\n", &ld, numRecords);

int idx = 0;
DENG2_FOR_EACH(i, ld.lumps(), LumpDirectory::LumpInfos::const_iterator)
DENG2_FOR_EACH_CONST(LumpDirectory::LumpInfos, i, ld.lumps())
{
LumpInfo const* lumpInfo = *i;
AutoStr* path = F_ComposeLumpPath(lumpInfo->container, lumpInfo->lumpIdx);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/engine/portable/src/lumpdirectory.cpp
Expand Up @@ -82,7 +82,7 @@ struct LumpDirectory::Instance
else hashMap->resize(numRecords);

// Clear the chains.
DENG2_FOR_EACH(i, *hashMap, HashMap::iterator)
DENG2_FOR_EACH(HashMap, i, *hashMap)
{
i->head = -1;
}
Expand Down Expand Up @@ -359,7 +359,7 @@ bool LumpDirectory::catalogues(de::AbstractFile& file)
// We may need to prune path-duplicate lumps.
d->pruneDuplicates();

DENG2_FOR_EACH(i, d->lumpInfos, LumpInfos::iterator)
DENG2_FOR_EACH(LumpInfos, i, d->lumpInfos)
{
LumpInfo const* lumpInfo = *i;
if(reinterpret_cast<de::AbstractFile*>(lumpInfo->container) == &file) return true;
Expand Down

0 comments on commit cbe5571

Please sign in to comment.