mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
Use find instead of lower_bounds.
llvm-svn: 25657
This commit is contained in:
parent
ab8e0e40f9
commit
bf023c019d
@ -56,10 +56,10 @@ public:
|
||||
/// not found.
|
||||
unsigned idFor(const T &Entry) const {
|
||||
// Search for entry in the map.
|
||||
typename std::map<T, unsigned>::iterator MI = Map.lower_bound(Entry);
|
||||
typename std::map<T, unsigned>::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;
|
||||
|
Loading…
Reference in New Issue
Block a user