summaryrefslogtreecommitdiff
path: root/src/audiocacheidmanager.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-01-29 16:56:10 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-01-29 16:56:10 +0100
commita0fbb86a492c3f8129e358ea3eb07e32995bb973 (patch)
tree57f5e1d6d079f336c23a7f4bcd30a2d781718f2a /src/audiocacheidmanager.cc
parentbbdde7f2d3c25e0fdc7c9e34c6dafcc8419dab3b (diff)
wip ...
Diffstat (limited to 'src/audiocacheidmanager.cc')
-rw-r--r--src/audiocacheidmanager.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/audiocacheidmanager.cc b/src/audiocacheidmanager.cc
index a3e16a0..444ac38 100644
--- a/src/audiocacheidmanager.cc
+++ b/src/audiocacheidmanager.cc
@@ -31,7 +31,7 @@
AudioCacheIDManager::~AudioCacheIDManager()
{
- assert(availableids.size() == id2cache.size()); // All ids should be released.
+ assert(available_ids.size() == id2cache.size()); // All ids should be released.
}
void AudioCacheIDManager::init(unsigned int capacity)
@@ -39,10 +39,10 @@ void AudioCacheIDManager::init(unsigned int capacity)
std::lock_guard<std::mutex> guard(mutex);
id2cache.resize(capacity);
- availableids.resize(capacity);
+ available_ids.resize(capacity);
for(size_t i = 0; i < capacity; ++i)
{
- availableids[i] = i;
+ available_ids[i] = i;
}
}
@@ -65,14 +65,14 @@ cacheid_t AudioCacheIDManager::registerID(const cache_t& cache)
cacheid_t id = CACHE_NOID;
- if(availableids.empty())
+ if(available_ids.empty())
{
return CACHE_DUMMYID;
}
else
{
- id = availableids.back();
- availableids.pop_back();
+ id = available_ids.back();
+ available_ids.pop_back();
}
assert(id2cache[id].id == CACHE_NOID); // Make sure it is not already in use
@@ -91,7 +91,7 @@ void AudioCacheIDManager::releaseID(cacheid_t id)
id2cache[id].id = CACHE_NOID;
- availableids.push_back(id);
+ available_ids.push_back(id);
}
void AudioCacheIDManager::disableActive()