BoostSet: Add 'remove' and rename BoostHash::erase to remove

This is more consistent with Qt's method naming.
This commit is contained in:
Jonas Kulla 2014-09-05 01:06:08 +02:00
parent 10186e8dcc
commit f665d8b41c
2 changed files with 7 additions and 2 deletions

View File

@ -53,7 +53,7 @@ public:
p.insert(PairType(key, value));
}
inline void erase(const K &key)
inline void remove(const K &key)
{
p.erase(key);
}
@ -116,6 +116,11 @@ public:
p.insert(key);
}
inline void remove(const K &key)
{
p.erase(key);
}
inline const_iterator cbegin() const
{
return p.cbegin();

View File

@ -233,7 +233,7 @@ SoundBuffer *SoundEmitter::allocateBuffer(const std::string &filename)
while (wouldBeBytes > SE_CACHE_MEM && !buffers.isEmpty())
{
SoundBuffer *last = buffers.tail();
bufferHash.erase(last->key);
bufferHash.remove(last->key);
buffers.remove(last->link);
wouldBeBytes -= last->bytes;