mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-18 02:16:43 +00:00
Make the iterator form of erase return void, since it always succeeds,
and since this is what std::map and std::set do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f8ff40c059
commit
e3955df639
@ -185,13 +185,12 @@ public:
|
||||
++NumTombstones;
|
||||
return true;
|
||||
}
|
||||
bool erase(iterator I) {
|
||||
void erase(iterator I) {
|
||||
BucketT *TheBucket = &*I;
|
||||
TheBucket->second.~ValueT();
|
||||
TheBucket->first = getTombstoneKey();
|
||||
--NumEntries;
|
||||
++NumTombstones;
|
||||
return true;
|
||||
}
|
||||
|
||||
void swap(DenseMap& RHS) {
|
||||
|
@ -106,8 +106,8 @@ public:
|
||||
const_iterator end() const { return ConstIterator(TheMap.end()); }
|
||||
|
||||
iterator find(const ValueT &V) { return Iterator(TheMap.find(V)); }
|
||||
bool erase(Iterator I) { return TheMap.erase(I.I); }
|
||||
bool erase(ConstIterator CI) { return TheMap.erase(CI.I); }
|
||||
void erase(Iterator I) { return TheMap.erase(I.I); }
|
||||
void erase(ConstIterator CI) { return TheMap.erase(CI.I); }
|
||||
|
||||
std::pair<iterator, bool> insert(const ValueT &V) {
|
||||
return TheMap.insert(std::make_pair(V, 0));
|
||||
|
@ -149,7 +149,7 @@ public:
|
||||
bool erase(const KeyT &Val) {
|
||||
return Map.erase(Wrap(Val));
|
||||
}
|
||||
bool erase(iterator I) {
|
||||
void erase(iterator I) {
|
||||
return Map.erase(I.base());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user