From c8571364fc954adb0d918d7bd002b62adfaa0d40 Mon Sep 17 00:00:00 2001 From: danij Date: Tue, 17 Jan 2012 01:45:50 +0000 Subject: [PATCH] LumpDirectory|Fixed: Search pattern was re-mapped unnecessarily LumpDirectory::IndexForPath would re-map the search pattern each time it was compared against a path in the hash chain. --- doomsday/engine/portable/src/lumpdirectory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doomsday/engine/portable/src/lumpdirectory.c b/doomsday/engine/portable/src/lumpdirectory.c index c17d5c583c..4415c18968 100644 --- a/doomsday/engine/portable/src/lumpdirectory.c +++ b/doomsday/engine/portable/src/lumpdirectory.c @@ -362,7 +362,10 @@ lumpnum_t LumpDirectory_IndexForPath(LumpDirectory* ld, const char* path) // Time to build the pattern? if(!builtSearchPattern) + { PathMap_Initialize(&searchPattern, path); + builtSearchPattern = true; + } if(PathDirectoryNode_MatchDirectory(node, 0, &searchPattern, NULL/*no paramaters*/)) {