mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Add count() method to MapVector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165559 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
63b8ab29c4
commit
8161d81239
1 file changed
+5
@@ -78,6 +78,11 @@ public:
|
||||
}
|
||||
return Vector[I].second;
|
||||
}
|
||||
|
||||
unsigned count(const KeyT &Key) const {
|
||||
typename MapType::const_iterator Pos = Map.find(Key);
|
||||
return Pos == Map.end()? 0 : 1;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user