From 33f99e9c708f980c088d00aa35ef7f5cb3d569c9 Mon Sep 17 00:00:00 2001 From: Laurens Voerman Date: Mon, 15 Jan 2018 16:42:31 +0100 Subject: [PATCH] fix vc2017 compile warning 'unsigned int' to 'const char' --- include/osgWidget/Util | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/osgWidget/Util b/include/osgWidget/Util index 694cdd229..c9f5f1d26 100644 --- a/include/osgWidget/Util +++ b/include/osgWidget/Util @@ -48,12 +48,17 @@ inline std::ostream& info() return _notify(); } +inline char lowerCaseChar(const char in) +{ + return (unsigned char)(::tolower((int)((unsigned char)in))); +} + inline std::string lowerCase(const std::string& str) { std::string s = str; // TODO: Why can't I specify std::tolower? - std::transform(s.begin(), s.end(), s.begin(), ::tolower); + std::transform(s.begin(), s.end(), s.begin(), lowerCaseChar); return s; }