From 3e0be526bfaafeb68b8ce38aa50b1b0f1598fc03 Mon Sep 17 00:00:00 2001 From: Jim Laskey Date: Thu, 26 Jan 2006 20:30:51 +0000 Subject: [PATCH] Use find instead of lower_bounds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25657 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/UniqueVector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/UniqueVector.h b/include/llvm/ADT/UniqueVector.h index e888678675e..93a9b1c6b50 100644 --- a/include/llvm/ADT/UniqueVector.h +++ b/include/llvm/ADT/UniqueVector.h @@ -56,10 +56,10 @@ public: /// not found. unsigned idFor(const T &Entry) const { // Search for entry in the map. - typename std::map::iterator MI = Map.lower_bound(Entry); + typename std::map::iterator MI = Map.find(Entry); // See if entry exists, if so return ID. - if (MI != Map.end() && MI->first == Entry) return MI->second; + if (MI != Map.end()) return MI->second; // No luck. return 0;