Better fix for mac/xcode compatibility problem in SL-18391. Keep using unordered_map

meow-7.2.2
Brad Kittenbrink 2022-10-18 21:01:38 -07:00
parent 9e5c0877c5
commit f575c13930
2 changed files with 8 additions and 3 deletions

View File

@ -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())

View File

@ -30,7 +30,7 @@
#include "llgltfmaterial.h"
#include "llpointer.h"
#include <map>
#include <unordered_map>
class LLFetchedGLTFMaterial;
@ -49,7 +49,7 @@ public:
static void registerCallbacks();
private:
typedef std::map<LLUUID, LLPointer<LLFetchedGLTFMaterial > > uuid_mat_map_t;
typedef std::unordered_map<LLUUID, LLPointer<LLFetchedGLTFMaterial > > uuid_mat_map_t;
uuid_mat_map_t mList;
LLUUID mLastUpdateKey;