mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 21:45:36 +00:00
Merge branch 'UseFindInsteadOfLoop' into 'master'
Use O(log(n)) search instead of O(n) See merge request OpenMW/openmw!824
This commit is contained in:
commit
6446a48f91
1 changed files with 1 additions and 6 deletions
|
@ -55,12 +55,7 @@ namespace VFS
|
|||
|
||||
bool FileSystemArchive::contains(const std::string& file, char (*normalize_function)(char)) const
|
||||
{
|
||||
for (const auto& it : mIndex)
|
||||
{
|
||||
if(it.first == file)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return mIndex.find(file) != mIndex.end();
|
||||
}
|
||||
|
||||
std::string FileSystemArchive::getDescription() const
|
||||
|
|
Loading…
Reference in a new issue