From f665d8b41cb049cd6fef0defa621b99d48e08940 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Fri, 5 Sep 2014 01:06:08 +0200 Subject: [PATCH] BoostSet: Add 'remove' and rename BoostHash::erase to remove This is more consistent with Qt's method naming. --- src/boost-hash.h | 7 ++++++- src/soundemitter.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/boost-hash.h b/src/boost-hash.h index 0bfa56d..3ce746a 100644 --- a/src/boost-hash.h +++ b/src/boost-hash.h @@ -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(); diff --git a/src/soundemitter.cpp b/src/soundemitter.cpp index 65fe5e6..965556c 100644 --- a/src/soundemitter.cpp +++ b/src/soundemitter.cpp @@ -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;