From df440f3f33a277f927035d051bc98341227bbea5 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Tue, 14 Feb 2023 15:33:52 -0800
Subject: [PATCH] SL-19121: Address review comments from SL-19080 phase 2

---
 indra/llprimitive/llgltfmaterial.cpp            | 12 ++++++------
 indra/llprimitive/llgltfmaterial.h              |  4 ++--
 indra/llprimitive/tests/llgltfmaterial_test.cpp | 11 +++++------
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp
index 291e2c2bf56..4d7b10982a9 100644
--- a/indra/llprimitive/llgltfmaterial.cpp
+++ b/indra/llprimitive/llgltfmaterial.cpp
@@ -31,14 +31,14 @@
 // NOTE -- this should be the one and only place tiny_gltf.h is included
 #include "tinygltf/tiny_gltf.h"
 
-const char* LLGLTFMaterial::ASSET_VERSION = "1.1";
-const char* LLGLTFMaterial::ASSET_TYPE = "GLTF 2.0";
+const char* const LLGLTFMaterial::ASSET_VERSION = "1.1";
+const char* const LLGLTFMaterial::ASSET_TYPE = "GLTF 2.0";
 const std::array<std::string, 2> LLGLTFMaterial::ACCEPTED_ASSET_VERSIONS = { "1.0", "1.1" };
 
-const char* GLTF_FILE_EXTENSION_TRANSFORM = "KHR_texture_transform";
-const char* GLTF_FILE_EXTENSION_TRANSFORM_SCALE = "scale";
-const char* GLTF_FILE_EXTENSION_TRANSFORM_OFFSET = "offset";
-const char* GLTF_FILE_EXTENSION_TRANSFORM_ROTATION = "rotation";
+const char* const GLTF_FILE_EXTENSION_TRANSFORM = "KHR_texture_transform";
+const char* const GLTF_FILE_EXTENSION_TRANSFORM_SCALE = "scale";
+const char* const GLTF_FILE_EXTENSION_TRANSFORM_OFFSET = "offset";
+const char* const GLTF_FILE_EXTENSION_TRANSFORM_ROTATION = "rotation";
 
 // special UUID that indicates a null UUID in override data
 static const LLUUID GLTF_OVERRIDE_NULL_UUID = LLUUID("ffffffff-ffff-ffff-ffff-ffffffffffff");
diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h
index a3e0c0d9caf..cae7284421a 100644
--- a/indra/llprimitive/llgltfmaterial.h
+++ b/indra/llprimitive/llgltfmaterial.h
@@ -49,8 +49,8 @@ class LLGLTFMaterial : public LLRefCount
     // default material for reference
     static const LLGLTFMaterial sDefault;
 
-    static const char* ASSET_VERSION;
-    static const char* ASSET_TYPE;
+    static const char* const ASSET_VERSION;
+    static const char* const ASSET_TYPE;
     static const std::array<std::string, 2> ACCEPTED_ASSET_VERSIONS;
     static bool isAcceptedVersion(const std::string& version) { return std::find(ACCEPTED_ASSET_VERSIONS.cbegin(), ACCEPTED_ASSET_VERSIONS.cend(), version) != ACCEPTED_ASSET_VERSIONS.cend(); }
 
diff --git a/indra/llprimitive/tests/llgltfmaterial_test.cpp b/indra/llprimitive/tests/llgltfmaterial_test.cpp
index 97aa544c60c..b3f56788f7d 100644
--- a/indra/llprimitive/tests/llgltfmaterial_test.cpp
+++ b/indra/llprimitive/tests/llgltfmaterial_test.cpp
@@ -139,14 +139,13 @@ namespace tut
     template<> template<>
     void llgltfmaterial_object_t::test<1>()
     {
-        if (sizeof(void*) > 4) // Don't bother running this test for 32-bit systems
-        {
-            // If any fields are added/changed, these tests should be updated (consider also updating ASSET_VERSION in LLGLTFMaterial)
-            // This test result will vary between compilers, so only test a single platform
+#if ADDRESS_SIZE != 32
 #if LL_WINDOWS
-            ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 216);
+        // If any fields are added/changed, these tests should be updated (consider also updating ASSET_VERSION in LLGLTFMaterial)
+        // This test result will vary between compilers, so only test a single platform
+        ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 216);
+#endif
 #endif
-        }
         ensure_equals("LLGLTFMaterial texture info count", (U32)LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT, 4);
     }
 
-- 
GitLab