From 3bfe56b71f62b7a2d2ddf3c5ca49b98cb3ba309b Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Thu, 29 Mar 2018 06:46:19 -0700 Subject: [PATCH] Minor Windows fixes. --- src/RawModel.cpp | 2 +- src/utils/String_Utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RawModel.cpp b/src/RawModel.cpp index 27a10fa..230b180 100644 --- a/src/RawModel.cpp +++ b/src/RawModel.cpp @@ -594,7 +594,7 @@ size_t RawModel::CalculateNormals(bool onlyBroken) std::set brokenVerts; for (int vertIx = 0; vertIx < vertices.size(); vertIx ++) { RawVertex &vertex = vertices[vertIx]; - averagePos += (vertex.position / vertices.size()); + averagePos += (vertex.position / (float)vertices.size()); if (onlyBroken && (vertex.normal.LengthSquared() >= FLT_MIN)) { continue; } diff --git a/src/utils/String_Utils.h b/src/utils/String_Utils.h index 9f8c0ee..7b78078 100644 --- a/src/utils/String_Utils.h +++ b/src/utils/String_Utils.h @@ -74,7 +74,7 @@ namespace StringUtils { inline const std::string GetFileSuffixString(const std::string &path) { const std::string fileName = GetFileNameString(path); - unsigned long pos = fileName.rfind('.'); + size_t pos = fileName.rfind('.'); if (pos == std::string::npos) { return ""; }