Use O(log(n)) search instead of O(n)

pull/593/head
CedricMocquillon 4 years ago
parent 3618eabaf0
commit e378159ea8

@ -55,12 +55,7 @@ namespace VFS
bool FileSystemArchive::contains(const std::string& file, char (*normalize_function)(char)) const bool FileSystemArchive::contains(const std::string& file, char (*normalize_function)(char)) const
{ {
for (const auto& it : mIndex) return mIndex.find(file) != mIndex.end();
{
if(it.first == file)
return true;
}
return false;
} }
std::string FileSystemArchive::getDescription() const std::string FileSystemArchive::getDescription() const

Loading…
Cancel
Save