From 3f5e6280dbee3414d464a96a8d9d037c30adb123 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 26 Aug 2013 14:16:28 -0700 Subject: Tweak MAINT-3046 fix for faster remove_() performance --- indra/llcommon/llinstancetracker.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 7ef7d101db..55187d8325 100755 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -212,8 +212,11 @@ private: } void remove_() { - if (getMap_().find(mInstanceKey) != getMap_().end()) - getMap_().erase(mInstanceKey); + typename InstanceMap::iterator iter = getMap_().find(mInstanceKey); + if (iter != getMap_().end()) + { + getMap_().erase(iter); + } } private: -- cgit v1.2.3