diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-11-30 11:56:20 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:47:42 +0300 |
commit | bdb3c27342f5e1c1bbf8227f2b541b61eb7fa445 (patch) | |
tree | 26113077d59795f1e45485587dbaca60bca49f21 /indexer | |
parent | fafa57faa33e89b538dd9ebb7eb70bf417adf6b0 (diff) |
introduced ResourceManager::ThreadSlot system, and refactored code according to it.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/drawing_rules.cpp | 36 | ||||
-rw-r--r-- | indexer/drawing_rules.hpp | 12 |
2 files changed, 24 insertions, 24 deletions
diff --git a/indexer/drawing_rules.cpp b/indexer/drawing_rules.cpp index 15d937f997..7c7050c340 100644 --- a/indexer/drawing_rules.cpp +++ b/indexer/drawing_rules.cpp @@ -33,22 +33,22 @@ void BaseRule::CheckCacheSize(size_t s) MakeEmptyID2(); } -uint32_t BaseRule::GetID(size_t threadID) const +uint32_t BaseRule::GetID(size_t threadSlot) const { - ASSERT(m_id1.size() > threadID, ()); - return m_id1[threadID]; + ASSERT(m_id1.size() > threadSlot, ()); + return m_id1[threadSlot]; } -void BaseRule::SetID(size_t threadID, uint32_t id) const +void BaseRule::SetID(size_t threadSlot, uint32_t id) const { - ASSERT(m_id1.size() > threadID, ()); - m_id1[threadID] = id; + ASSERT(m_id1.size() > threadSlot, ()); + m_id1[threadSlot] = id; } -void BaseRule::MakeEmptyID(size_t threadID) +void BaseRule::MakeEmptyID(size_t threadSlot) { - ASSERT(m_id1.size() > threadID, ()); - m_id1[threadID] = empty_id; + ASSERT(m_id1.size() > threadSlot, ()); + m_id1[threadSlot] = empty_id; } void BaseRule::MakeEmptyID() @@ -57,22 +57,22 @@ void BaseRule::MakeEmptyID() MakeEmptyID(i); } -uint32_t BaseRule::GetID2(size_t threadID) const +uint32_t BaseRule::GetID2(size_t threadSlot) const { - ASSERT(m_id2.size() > threadID, ()); - return m_id2[threadID]; + ASSERT(m_id2.size() > threadSlot, ()); + return m_id2[threadSlot]; } -void BaseRule::SetID2(size_t threadID, uint32_t id) const +void BaseRule::SetID2(size_t threadSlot, uint32_t id) const { - ASSERT(m_id2.size() > threadID, ()); - m_id2[threadID] = id; + ASSERT(m_id2.size() > threadSlot, ()); + m_id2[threadSlot] = id; } -void BaseRule::MakeEmptyID2(size_t threadID) +void BaseRule::MakeEmptyID2(size_t threadSlot) { - ASSERT(m_id2.size() > threadID, ()); - m_id2[threadID] = empty_id; + ASSERT(m_id2.size() > threadSlot, ()); + m_id2[threadSlot] = empty_id; } void BaseRule::MakeEmptyID2() diff --git a/indexer/drawing_rules.hpp b/indexer/drawing_rules.hpp index a596e36295..575673cee6 100644 --- a/indexer/drawing_rules.hpp +++ b/indexer/drawing_rules.hpp @@ -33,17 +33,17 @@ namespace drule void CheckCacheSize(size_t s); - uint32_t GetID(size_t threadID) const; - void SetID(size_t threadID, uint32_t id) const; + uint32_t GetID(size_t threadSlot) const; + void SetID(size_t threadSlot, uint32_t id) const; - void MakeEmptyID(size_t threadID); + void MakeEmptyID(size_t threadSlot); void MakeEmptyID(); - uint32_t GetID2(size_t threadID) const; + uint32_t GetID2(size_t threadSlot) const; - void SetID2(size_t threadID, uint32_t id) const; + void SetID2(size_t threadSlot, uint32_t id) const; - void MakeEmptyID2(size_t threadID); + void MakeEmptyID2(size_t threadSlot); void MakeEmptyID2(); |