From 7318e11571237bd55ff5972350db499a73ef6ae5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 12 Apr 2012 09:42:51 -0400 Subject: Fix misleading comments, per Richard's code review. --- indra/llcommon/lltypeinfolookup.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra') 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(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; }; -- cgit v1.2.3