Skip to content

Commit

Permalink
Optimize|LumpIndex: Only prune duplicates when needed
Browse files Browse the repository at this point in the history
Messing about with the potentially large QBitArray is unnecessary if
the "need prune duplicates" flag is unset.
  • Loading branch information
skyjake committed Dec 5, 2012
1 parent ac5da31 commit 3c17b04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/engine/src/filesys/lumpindex.cpp
Expand Up @@ -242,6 +242,8 @@ struct LumpIndex::Instance

void pruneDuplicates()
{
if(!(flags & LIF_NEED_PRUNE_DUPLICATES)) return;

int const numRecords = lumps.size();
if(numRecords <= 1) return;

Expand Down

0 comments on commit 3c17b04

Please sign in to comment.