1
0
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:
CedricMocquillon 2021-05-01 23:21:21 +02:00
parent 3618eabaf0
commit e378159ea8

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