From 6fba9407c1154d22534e3a0fecc80463ab8bb6fc Mon Sep 17 00:00:00 2001 From: Balun Vladimir Date: Wed, 20 Nov 2019 20:58:50 +0300 Subject: [PATCH] Fixed small warnings for VS2017 compiler Fixed cast warnings for some types. --- Source/OBJ_Loader.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/OBJ_Loader.h b/Source/OBJ_Loader.h index 0b7d010..af77467 100644 --- a/Source/OBJ_Loader.h +++ b/Source/OBJ_Loader.h @@ -649,7 +649,7 @@ namespace objl if (temp.size() != 1) { - for (int i = 0; i < temp.size() - 1; i++) + for (size_t i = 0; i < temp.size() - 1; i++) { pathtomat += temp[i] + "/"; } @@ -686,13 +686,13 @@ namespace objl file.close(); // Set Materials for each Mesh - for (int i = 0; i < MeshMatNames.size(); i++) + for (size_t i = 0; i < MeshMatNames.size(); i++) { std::string matname = MeshMatNames[i]; // Find corresponding material name in loaded materials // when found copy material variables into mesh material - for (int j = 0; j < LoadedMaterials.size(); j++) + for (size_t j = 0; j < LoadedMaterials.size(); j++) { if (LoadedMaterials[j].name == matname) { @@ -946,7 +946,7 @@ namespace objl } // If Vertex is not an interior vertex - float angle = math::AngleBetweenV3(pPrev.Position - pCur.Position, pNext.Position - pCur.Position) * (180 / 3.14159265359); + float angle = static_cast(math::AngleBetweenV3(pPrev.Position - pCur.Position, pNext.Position - pCur.Position) * (180 / 3.14159265359)); if (angle <= 0 && angle >= 180) continue;