diff options
| author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-08-17 21:57:54 +0200 | 
|---|---|---|
| committer | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-08-18 00:08:00 +0200 | 
| commit | d3ed94885bcce5b7216ee23dc729de5409b73e53 (patch) | |
| tree | 9033f0f1c0bfae68ab50adac1b5188033f02b56a | |
| parent | 9d981c72f8d098baeae9e9fa1e3c4737f957bbe2 (diff) | |
SL-20140 Optimization LLDictionary::addEntry() - avoid of double search
| -rw-r--r-- | indra/llcommon/lldictionary.h | 3 | 
1 files changed, 1 insertions, 2 deletions
| diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h index 5800ec5e5d..3e86767d7e 100644 --- a/indra/llcommon/lldictionary.h +++ b/indra/llcommon/lldictionary.h @@ -87,11 +87,10 @@ protected:  	}  	void addEntry(Index index, Entry *entry)  	{ -		if (lookup(index)) +		if (!insert(value_type(index, entry)).second)  		{  			LL_ERRS() << "Dictionary entry already added (attempted to add duplicate entry)" << LL_ENDL;  		} -		(*this)[index] = entry;  	}  }; | 
