From 58a6ac384e3253a7f9c52f4097406f215aa23664 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 29 Apr 2021 08:15:37 +1200 Subject: [PATCH] Replace some QMap occurrences with QHash --- libraries/model-serializers/src/GLTFSerializer.cpp | 2 +- libraries/shared/src/BlendshapeConstants.cpp | 6 +++--- libraries/shared/src/BlendshapeConstants.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/model-serializers/src/GLTFSerializer.cpp b/libraries/model-serializers/src/GLTFSerializer.cpp index d957d7ae77..9b0145c112 100755 --- a/libraries/model-serializers/src/GLTFSerializer.cpp +++ b/libraries/model-serializers/src/GLTFSerializer.cpp @@ -1583,7 +1583,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& && fileTargetNames.contains("viseme_O") && fileTargetNames.contains("mouthShrugLower"); if (blendshapeMappings.count() == 0 && likelyReadyPlayerMeFile) { - QMap>::const_iterator synonym + QHash>::const_iterator synonym = READYPLAYERME_BLENDSHAPES_MAP.constBegin(); while (synonym != READYPLAYERME_BLENDSHAPES_MAP.constEnd()) { if (fileTargetNames.contains(synonym.key())) { diff --git a/libraries/shared/src/BlendshapeConstants.cpp b/libraries/shared/src/BlendshapeConstants.cpp index 6e28f5079c..01f8c2db19 100644 --- a/libraries/shared/src/BlendshapeConstants.cpp +++ b/libraries/shared/src/BlendshapeConstants.cpp @@ -77,15 +77,15 @@ const char* BLENDSHAPE_NAMES[] = { "" }; -const QMap BLENDSHAPE_LOOKUP_MAP = [] { - QMap toReturn; +const QHash BLENDSHAPE_LOOKUP_MAP = [] { + QHash toReturn; for (int i = 0; i < (int)Blendshapes::BlendshapeCount; i++) { toReturn[BLENDSHAPE_NAMES[i]] = i; } return toReturn; }(); -const QMap> READYPLAYERME_BLENDSHAPES_MAP = { +const QHash> READYPLAYERME_BLENDSHAPES_MAP = { // ReadyPlayerMe blendshape default mapping. { "mouthOpen", { "JawOpen", 1.0f } }, { "eyeBlinkLeft", { "EyeBlink_L", 1.0f } }, diff --git a/libraries/shared/src/BlendshapeConstants.h b/libraries/shared/src/BlendshapeConstants.h index b2a6630224..5dd1f0abbb 100644 --- a/libraries/shared/src/BlendshapeConstants.h +++ b/libraries/shared/src/BlendshapeConstants.h @@ -12,15 +12,15 @@ #ifndef hifi_BlendshapeConstants_h #define hifi_BlendshapeConstants_h -#include +#include #include #include /// The names of the supported blendshapes, terminated with an empty string. extern const char* BLENDSHAPE_NAMES[]; -extern const QMap BLENDSHAPE_LOOKUP_MAP; -extern const QMap> READYPLAYERME_BLENDSHAPES_MAP; +extern const QHash BLENDSHAPE_LOOKUP_MAP; +extern const QHash> READYPLAYERME_BLENDSHAPES_MAP; enum class Blendshapes : int { EyeBlink_L = 0,