From 75d2382dc3fd1beb190eba12188883db98278f89 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 26 Jul 2011 18:54:07 -0700 Subject: fixed build --- indra/llcommon/llinstancetracker.h | 10 +++++----- indra/llcommon/tests/llinstancetracker_test.cpp | 16 ++-------------- 2 files changed, 7 insertions(+), 19 deletions(-) (limited to 'indra') 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(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 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); -- cgit v1.2.3