summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-11-11 07:32:59 -0500
committerNat Goodspeed <nat@lindenlab.com>2009-11-11 07:32:59 -0500
commit43ae94ab0f35dafaa0e1787a155290e371e317a1 (patch)
tree758423990277d2a9aa0575728ff53fe3335525a8 /indra
parent113a0271cc7d8db1d76b285365190ddeb276bacd (diff)
Rename private methods to avoid ambiguity with subclasses
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llinstancetracker.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
index 039d68faef..11fe523651 100644
--- a/indra/llcommon/llinstancetracker.h
+++ b/indra/llcommon/llinstancetracker.h
@@ -61,46 +61,46 @@ public:
static T* getInstance(const KEY& k)
{
- typename InstanceMap::const_iterator found = getMap().find(k);
- return (found == getMap().end()) ? NULL : found->second;
+ typename InstanceMap::const_iterator found = getMap_().find(k);
+ return (found == getMap_().end()) ? NULL : found->second;
}
static key_iter beginKeys()
{
- return boost::make_transform_iterator(getMap().begin(),
+ return boost::make_transform_iterator(getMap_().begin(),
boost::bind(&InstanceMap::value_type::first, _1));
}
static key_iter endKeys()
{
- return boost::make_transform_iterator(getMap().end(),
+ return boost::make_transform_iterator(getMap_().end(),
boost::bind(&InstanceMap::value_type::first, _1));
}
static instance_iter beginInstances()
{
- return instance_iter(boost::make_transform_iterator(getMap().begin(),
+ return instance_iter(boost::make_transform_iterator(getMap_().begin(),
boost::bind(&InstanceMap::value_type::second, _1)));
}
static instance_iter endInstances()
{
- return instance_iter(boost::make_transform_iterator(getMap().end(),
+ return instance_iter(boost::make_transform_iterator(getMap_().end(),
boost::bind(&InstanceMap::value_type::second, _1)));
}
- static S32 instanceCount() { return getMap().size(); }
+ static S32 instanceCount() { return getMap_().size(); }
protected:
- LLInstanceTracker(KEY key) { add(key); }
- virtual ~LLInstanceTracker() { remove(); }
- virtual void setKey(KEY key) { remove(); add(key); }
+ LLInstanceTracker(KEY key) { add_(key); }
+ virtual ~LLInstanceTracker() { remove_(); }
+ virtual void setKey(KEY key) { remove_(); add_(key); }
virtual const KEY& getKey() const { return mKey; }
private:
- void add(KEY key)
+ void add_(KEY key)
{
mKey = key;
- getMap()[key] = static_cast<T*>(this);
+ getMap_()[key] = static_cast<T*>(this);
}
- void remove() { getMap().erase(mKey); }
+ void remove_() { getMap_().erase(mKey); }
- static InstanceMap& getMap()
+ static InstanceMap& getMap_()
{
if (! sInstances)
{
@@ -129,19 +129,19 @@ public:
/// for completeness of analogy with the generic implementation
static T* getInstance(T* k) { return k; }
- static key_iter beginKeys() { return getSet().begin(); }
- static key_iter endKeys() { return getSet().end(); }
- static instance_iter beginInstances() { return instance_iter(getSet().begin()); }
- static instance_iter endInstances() { return instance_iter(getSet().end()); }
- static S32 instanceCount() { return getSet().size(); }
+ static key_iter beginKeys() { return getSet_().begin(); }
+ static key_iter endKeys() { return getSet_().end(); }
+ static instance_iter beginInstances() { return instance_iter(getSet_().begin()); }
+ static instance_iter endInstances() { return instance_iter(getSet_().end()); }
+ static S32 instanceCount() { return getSet_().size(); }
protected:
- LLInstanceTracker() { getSet().insert(static_cast<T*>(this)); }
- virtual ~LLInstanceTracker() { getSet().erase(static_cast<T*>(this)); }
+ LLInstanceTracker() { getSet_().insert(static_cast<T*>(this)); }
+ virtual ~LLInstanceTracker() { getSet_().erase(static_cast<T*>(this)); }
- LLInstanceTracker(const LLInstanceTracker& other) { getSet().insert(static_cast<T*>(this)); }
+ LLInstanceTracker(const LLInstanceTracker& other) { getSet_().insert(static_cast<T*>(this)); }
- static InstanceSet& getSet() // called after getReady() but before go()
+ static InstanceSet& getSet_() // called after getReady() but before go()
{
if (! sInstances)
{