From 8ce4e54394ec111fa5664d7358622d6d3e6cb377 Mon Sep 17 00:00:00 2001 From: Arthur Brainville Date: Wed, 10 Jan 2018 01:27:12 +0100 Subject: [PATCH] Silence a MSVC warning about narrowing conversion We actually want to convert a size_t value into an int value in this return statement. Fix the annoying MSVC warning by actually casting the bytestride to an int Signed-off-by: Arthur Brainville (Ybalrid) --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index bf316c4..0b03780 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -522,7 +522,7 @@ struct Accessor { if ((bufferViewObject.byteStride % componentSizeInBytes) != 0) { return -1; } - return bufferViewObject.byteStride; + return static_cast(bufferViewObject.byteStride); } return 0;