diff options
author | Brad Linden <brad@lindenlab.com> | 2024-06-11 15:39:48 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2024-06-11 15:39:48 -0700 |
commit | a7b0f9391146b42dd5cd5f47f845de81bfdb6820 (patch) | |
tree | 4d0e499b14abe28434de8f9cc97a50fa92e0d6e0 /indra/newview/gltf/accessor.cpp | |
parent | 7c42711ca3a4e67b95473aa5129dce5ff19bea15 (diff) |
Fixed signed/unsigned warnings after they got enabled in the maint-A merge
Diffstat (limited to 'indra/newview/gltf/accessor.cpp')
-rw-r--r-- | indra/newview/gltf/accessor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/gltf/accessor.cpp b/indra/newview/gltf/accessor.cpp index 9f1cb0c1cd..2ef9237f2d 100644 --- a/indra/newview/gltf/accessor.cpp +++ b/indra/newview/gltf/accessor.cpp @@ -108,7 +108,8 @@ void Buffer::erase(Asset& asset, S32 offset, S32 length) mData.erase(mData.begin() + offset, mData.begin() + offset + length); - mByteLength = mData.size(); + llassert(mData.size() <= size_t(INT_MAX)); + mByteLength = S32(mData.size()); for (BufferView& view : asset.mBufferViews) { @@ -141,7 +142,7 @@ bool Buffer::prep(Asset& asset) } mData.resize(mByteLength); - if (!file.read((U8*)mData.data(), mData.size())) + if (!file.read((U8*)mData.data(), mByteLength)) { LL_WARNS("GLTF") << "Failed to load buffer data from asset: " << id << LL_ENDL; return false; |