From f575c139300a6c53fa13dd0d7cbfbaa739e2b4b0 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Tue, 18 Oct 2022 21:01:38 -0700 Subject: Better fix for mac/xcode compatibility problem in SL-18391. Keep using unordered_map --- indra/newview/llgltfmateriallist.cpp | 7 ++++++- indra/newview/llgltfmateriallist.h | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 84cf746198..0fd5f37b51 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -175,7 +175,12 @@ void LLGLTFMaterialList::flushMaterials() const F64 MAX_INACTIVE_TIME = 30.f; F64 cur_time = LLTimer::getTotalSeconds(); - uuid_mat_map_t::iterator iter = mList.upper_bound(mLastUpdateKey); + // advance iter one past the last key we updated + uuid_mat_map_t::iterator iter = mList.find(mLastUpdateKey); + if (iter != mList.end()) { + ++iter; + } + while (update_count-- > 0) { if (iter == mList.end()) diff --git a/indra/newview/llgltfmateriallist.h b/indra/newview/llgltfmateriallist.h index 3d97baf5f8..4b905e32c9 100644 --- a/indra/newview/llgltfmateriallist.h +++ b/indra/newview/llgltfmateriallist.h @@ -30,7 +30,7 @@ #include "llgltfmaterial.h" #include "llpointer.h" -#include +#include class LLFetchedGLTFMaterial; @@ -49,7 +49,7 @@ public: static void registerCallbacks(); private: - typedef std::map > uuid_mat_map_t; + typedef std::unordered_map > uuid_mat_map_t; uuid_mat_map_t mList; LLUUID mLastUpdateKey; -- cgit v1.2.3