From c3944d3e1a48220d423849472eb5aebc746185ea Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 29 Mar 2012 21:27:37 +0200 Subject: [PATCH] Use a normal binary search --- components/bsa/bsa_archive.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/components/bsa/bsa_archive.cpp b/components/bsa/bsa_archive.cpp index 9a325d160..a68e91df1 100644 --- a/components/bsa/bsa_archive.cpp +++ b/components/bsa/bsa_archive.cpp @@ -116,12 +116,7 @@ class DirArchive: public Ogre::FileSystemArchive } mrComparer comp(delimiter, copy.size() - delimiter-1); - std::vector::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: