summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llgltfmaterial.cpp12
-rw-r--r--indra/llprimitive/llgltfmaterial.h4
-rw-r--r--indra/llprimitive/tests/llgltfmaterial_test.cpp11
3 files changed, 13 insertions, 14 deletions
diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp
index 291e2c2bf5..4d7b10982a 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 a3e0c0d9ca..cae7284421 100644
--- a/indra/llprimitive/llgltfmaterial.h
+++ b/indra/llprimitive/llgltfmaterial.h
@@ -49,8 +49,8 @@ public:
// 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 97aa544c60..b3f56788f7 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);
}