mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Use O(log(n)) search instead of O(n)
This commit is contained in:
parent
3618eabaf0
commit
e378159ea8
@ -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 New Issue
Block a user