summaryrefslogtreecommitdiff
path: root/indra/newview/llgltfmateriallist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgltfmateriallist.cpp')
-rw-r--r--indra/newview/llgltfmateriallist.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 4c9dc8f7cd..875c73d931 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -47,9 +47,6 @@
#include "tinygltf/tiny_gltf.h"
#include <strstream>
-#include "json/reader.h"
-#include "json/value.h"
-
#include <unordered_set>
LLGLTFMaterialList gGLTFMaterialList;
@@ -208,8 +205,8 @@ void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::s
cache.mObjectId = id;
cache.mRegionHandle = region->getHandle();
- U32 count = llmin(tes.size(), MAX_TES);
- for (U32 i = 0; i < count; ++i)
+ auto count = llmin(tes.size(), MAX_TES);
+ for (size_t i = 0; i < count; ++i)
{
LLGLTFMaterial* mat = new LLGLTFMaterial(); // setTEGLTFMaterialOverride and cache will take ownership
mat->applyOverrideLLSD(od[i]);
@@ -383,7 +380,7 @@ void LLGLTFMaterialList::flushUpdates(void(*done_callback)(bool))
{
LLSD& data = sUpdates;
- S32 i = data.size();
+ auto i = data.size();
for (ModifyMaterialData& e : sModifyQueue)
{
@@ -494,7 +491,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp
}
buffer.resize(size);
- file.read((U8*)&buffer[0], buffer.size());
+ file.read((U8*)&buffer[0], static_cast<S32>(buffer.size()));
}
{
@@ -503,7 +500,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp
LLSD asset;
// read file into buffer
- std::istrstream str(&buffer[0], buffer.size());
+ std::istrstream str(&buffer[0], static_cast<S32>(buffer.size()));
if (LLSDSerialize::deserialize(asset, str, buffer.size()))
{
@@ -520,7 +517,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp
LL_PROFILE_ZONE_SCOPED;
tinygltf::TinyGLTF gltf;
- if (!gltf.LoadASCIIFromString(&asset_data->mModelIn, &error_msg, &warn_msg, data.c_str(), data.length(), ""))
+ if (!gltf.LoadASCIIFromString(&asset_data->mModelIn, &error_msg, &warn_msg, data.c_str(), static_cast<U32>(data.length()), ""))
{
LL_WARNS("GLTF") << "Failed to decode material asset: "
<< LL_NEWLINE