1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

Use a normal binary search

This commit is contained in:
Alexander "Ace" Olofsson 2012-03-29 21:27:37 +02:00
parent ce38876a74
commit c3944d3e1a

View File

@ -116,12 +116,7 @@ class DirArchive: public Ogre::FileSystemArchive
}
mrComparer comp(delimiter, copy.size() - delimiter-1);
std::vector<std::string>::iterator found = std::lower_bound(current.begin(), current.end(), copy, comp);
if (found != current.end() && !(comp(copy, current.front())))
return true;
return false;
return std::binary_search(current.begin(), current.end(), copy, comp);
}
public: