From 2191085580082d860904e6ac8ef86dc79e40474b Mon Sep 17 00:00:00 2001 From: Sandy Date: Fri, 10 May 2024 08:36:41 -0400 Subject: [PATCH] msvc 32bit: Fix C4244 warning On 32 bit msvc compilers with warnings on, there are C4244 warnings about from 'std::streamoff' to size_t to vector::size_type --- tiny_gltf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 62006c4..e2ca5bd 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -3042,7 +3042,7 @@ bool GetFileSizeInBytes(size_t *filesize_out, std::string *err, return false; } - (*filesize_out) = sz; + (*filesize_out) = static_cast(sz); return true; #endif } @@ -3067,7 +3067,7 @@ bool ReadWholeFile(std::vector *out, std::string *err, } return false; } - out->resize(size); + out->resize(static_cast(size)); AAsset_read(asset, reinterpret_cast(&out->at(0)), size); AAsset_close(asset); return true;