mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
Use find instead of lower_bounds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bc9ae377d9
commit
3e0be526bf
@ -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