summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-04-12 09:42:51 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-04-12 09:42:51 -0400
commit7318e11571237bd55ff5972350db499a73ef6ae5 (patch)
tree8e6986d868379012e8686d0f1ff1a4ffc242144f /indra/llcommon
parent4743a2dac6af23a602c7ce8c5b5b0d351ae340e7 (diff)
Fix misleading comments, per Richard's code review.
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/lltypeinfolookup.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/llcommon/lltypeinfolookup.h b/indra/llcommon/lltypeinfolookup.h
index fc99f7ff33..7510cc12ed 100644
--- a/indra/llcommon/lltypeinfolookup.h
+++ b/indra/llcommon/lltypeinfolookup.h
@@ -66,11 +66,14 @@ public:
return mVector.insert(pair);
}
+ // const find() forwards to non-const find(): this can alter mVector!
const_iterator find(const std::type_info* key) const
{
return const_cast<self*>(this)->find(key);
}
+ // non-const find() caches previously-unknown type_info* to speed future
+ // lookups.
iterator find(const std::type_info* key)
{
iterator found = mVector.find(key);
@@ -101,11 +104,6 @@ public:
}
private:
- /// Our LLSortedVector is mutable so that if we're passed an unrecognized
- /// std::type_info* for a registered type (which we can identify by
- /// searching for the name() string), we can cache the new std::type_info*
- /// to speed future lookups -- even when the containing LLTypeInfoLookup
- /// is const.
vector_type mVector;
};