From 6205b16fbfd1a8c1d59928543f6258acd6f0382b Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 23 Jan 2015 21:11:15 +0100 Subject: [PATCH] Changed: Optimize sorting of files (instead of doing it several times for each directory, do it only once) --HG-- branch : develop --- code/nel/src/misc/path.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index d47b8ce4a..8f2926728 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -858,6 +858,8 @@ string getname (dirent *de) void CPath::getPathContent (const string &path, bool recurse, bool wantDir, bool wantFile, vector &result, class IProgressCallback *progressCallBack, bool showEverything) { getInstance()->_FileContainer.getPathContent(path, recurse, wantDir, wantFile, result, progressCallBack, showEverything); + + sort(result.begin(), result.end()); } void CFileContainer::getPathContent (const string &path, bool recurse, bool wantDir, bool wantFile, vector &result, class IProgressCallback *progressCallBack, bool showEverything) @@ -960,8 +962,6 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want progressCallBack->popCropedValues (); } } - - sort(result.begin(), result.end()); } void CPath::removeAllAlternativeSearchPath ()