diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 352c837a35d6626897dd91bde58e688c9d476abc..82165fd844ffdf4364fc4898d0e138f398fdb72b 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -268,22 +268,22 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap LLSD headers = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS]; // build dummy entries for the failed requests - for (RequestQueue_t::const_iterator it = requests.begin(); it != requests.end(); ++it) + for (const LLUUID& exp_id : requests) { - LLSD exp = get(*it); + LLSD exp = get(exp_id); //leave the properties alone if we already have a cache entry for this xp if (exp.isUndefined()) { exp[PROPERTIES] = PROPERTY_INVALID; } exp[EXPIRES] = now + LLExperienceCacheImpl::getErrorRetryDeltaTime(status, headers); - exp[EXPERIENCE_ID] = *it; + exp[EXPERIENCE_ID] = exp_id; exp["key_type"] = EXPERIENCE_ID; - exp["uuid"] = *it; + exp["uuid"] = exp_id; exp["error"] = (LLSD::Integer)status.getType(); exp[QUOTA] = DEFAULT_QUOTA; - processExperience(*it, exp); + processExperience(exp_id, exp); } return; } diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h index c052a337901be12a9bf5a0dccb12b708502140cd..41b5a891135ed6d47eecf1dafdaa0a8f04b8c72c 100644 --- a/indra/llmessage/llexperiencecache.h +++ b/indra/llmessage/llexperiencecache.h @@ -37,6 +37,8 @@ #include <boost/signals2.hpp> #include <boost/function.hpp> +#include "boost/unordered_map.hpp" + class LLSD; class LLUUID; @@ -116,11 +118,11 @@ class LLExperienceCache final : public LLParamSingleton < LLExperienceCache > // May have multiple callbacks for a single ID, which are // represented as multiple slots bound to the signal. // Avoid copying signals via pointers. - typedef std::map<LLUUID, signal_ptr> signal_map_t; - typedef std::map<LLUUID, LLSD> cache_t; + typedef boost::unordered_map<LLUUID, signal_ptr> signal_map_t; + typedef boost::unordered_map<LLUUID, LLSD> cache_t; typedef std::set<LLUUID> RequestQueue_t; - typedef std::map<LLUUID, F64> PendingQueue_t; + typedef boost::unordered_map<LLUUID, F64> PendingQueue_t; //-------------------------------------------- static const std::string PRIVATE_KEY; // "private_id"