diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-07-26 18:54:07 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-07-26 18:54:07 -0700 |
commit | 75d2382dc3fd1beb190eba12188883db98278f89 (patch) | |
tree | f13889ed6ead09ca418219a118198ef60f1e9745 | |
parent | 9b6fbf8d5778b2a01ee24d7c7b8ddd0c405e9458 (diff) |
fixed build
-rw-r--r-- | indra/llcommon/llinstancetracker.h | 10 | ||||
-rw-r--r-- | indra/llcommon/tests/llinstancetracker_test.cpp | 16 |
2 files changed, 7 insertions, 19 deletions
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 1ac6629f8a..47041f790f 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -73,12 +73,12 @@ public: void increment() { mIterator++; } bool equal(instance_iter const& other) const { - return mIterator == other.m_iterator; + return mIterator == other.mIterator; } T& dereference() const { - return mIterator->second; + return *(mIterator->second); } typename InstanceMap::iterator mIterator; @@ -102,14 +102,14 @@ public: friend class boost::iterator_core_access; void increment() { mIterator++; } - bool equal(instance_iter const& other) const + bool equal(key_iter const& other) const { - return mIterator == other.m_iterator; + return mIterator == other.mIterator; } KEY& dereference() const { - return mIterator->first; + return const_cast<KEY&>(mIterator->first); } typename InstanceMap::iterator mIterator; diff --git a/indra/llcommon/tests/llinstancetracker_test.cpp b/indra/llcommon/tests/llinstancetracker_test.cpp index af55341e1f..73cbd76d91 100644 --- a/indra/llcommon/tests/llinstancetracker_test.cpp +++ b/indra/llcommon/tests/llinstancetracker_test.cpp @@ -151,25 +151,13 @@ namespace tut { Unkeyed one, two, three; typedef std::set<Unkeyed*> KeySet; - KeySet keys; - keys.insert(&one); - keys.insert(&two); - keys.insert(&three); - { - for (Unkeyed::key_iter ki(beginKeys()), kend(endKeys()); - ki != kend; ++ki) - { - ensure_equals("spurious key", keys.erase(*ki), 1); - } - } - ensure_equals("unreported key", keys.size(), 0); - + KeySet instances; instances.insert(&one); instances.insert(&two); instances.insert(&three); { - for (Unkeyed::instance_iter ii(beginInstances()), iend(endInstances()); ii != iend; ++ii) + for (Unkeyed::instance_iter ii(Unkeyed::beginInstances()), iend(Unkeyed::endInstances()); ii != iend; ++ii) { Unkeyed& ref = *ii; ensure_equals("spurious instance", instances.erase(&ref), 1); |