Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Oct 3, 2012
1 parent b03bcfe commit 7e367e0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doomsday/engine/portable/src/lumpdirectory.cpp
Expand Up @@ -122,14 +122,16 @@ struct LumpDirectory::Instance
else
{
// Do this one lump at a time, respecting the possibly-sorted order.
for(int i = 0, origIdx = 0; i < numRecords; ++i, origIdx++)
for(int i = 0, newIdx = 0; i < numRecords; ++i)
{
if(!flaggedLumps.testBit(origIdx)) continue;
if(!flaggedLumps.testBit(i))
{
++newIdx;
continue;
}

// Move the info for the lump to be pruned to the end.
lumpInfos.move(i, lumpInfos.size() - 1);
--i;
--numRecords;
lumpInfos.move(newIdx, lumpInfos.size() - 1);
}

// Erase the pruned lumps from the end of the list.
Expand Down

0 comments on commit 7e367e0

Please sign in to comment.