From b97b25e40b3c01fa9bd48d13f5c15b585bcf5b97 Mon Sep 17 00:00:00 2001 From: LoopDawg <sk_opengl@khasekhemwy.net> Date: Wed, 12 Jul 2017 09:04:39 -0600 Subject: [PATCH] Fix StandAlone.cpp compilation warnings find_first_of returns size_t, was overflowing int. --- StandAlone/StandAlone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 1e2c8f734..1089432a3 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -176,7 +176,7 @@ public: fixLine(def); // The first "=" needs to turn into a space - int equal = def.find_first_of("="); + const size_t equal = def.find_first_of("="); if (equal != def.npos) def[equal] = ' '; @@ -197,7 +197,7 @@ protected: void fixLine(std::string& line) { // Can't go past a newline in the line - int end = line.find_first_of("\n"); + const size_t end = line.find_first_of("\n"); if (end != line.npos) line = line.substr(0, end); } -- GitLab