From 98684ac2fa474107abae546e8f9ba95ac7b30402 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 10 Jul 2019 15:53:30 -0700 Subject: [PATCH] Fix C4365 warning --- Utilities/WaveFrontReader.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Utilities/WaveFrontReader.h b/Utilities/WaveFrontReader.h index a125223..8e5f066 100644 --- a/Utilities/WaveFrontReader.h +++ b/Utilities/WaveFrontReader.h @@ -165,7 +165,7 @@ public: else { // OBJ format uses 1-based arrays - vertexIndex = iPosition - 1; + vertexIndex = uint32_t(iPosition - 1); } if (vertexIndex >= positions.size()) @@ -196,7 +196,7 @@ public: else { // OBJ format uses 1-based arrays - coordIndex = iTexCoord - 1; + coordIndex = uint32_t(iTexCoord - 1); } if (coordIndex >= texCoords.size()) @@ -226,7 +226,7 @@ public: else { // OBJ format uses 1-based arrays - normIndex = iNormal - 1; + normIndex = uint32_t(iNormal - 1); } if (normIndex >= normals.size()) @@ -477,7 +477,7 @@ public: // Shininess int nShininess; InFile >> nShininess; - curMaterial->nShininess = nShininess; + curMaterial->nShininess = uint32_t(nShininess); } else if (0 == wcscmp(strCommand.c_str(), L"illum")) {