1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 03:45:32 +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:
elsid 2021-05-06 11:01:23 +00:00
commit 6446a48f91

View file

@ -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