fix vc2017 compile warning 'unsigned int' to 'const char'

This commit is contained in:
Laurens Voerman 2018-01-15 16:42:31 +01:00
parent 1126812f8f
commit 33f99e9c70

View File

@ -48,12 +48,17 @@ inline std::ostream& info()
return _notify(); return _notify();
} }
inline char lowerCaseChar(const char in)
{
return (unsigned char)(::tolower((int)((unsigned char)in)));
}
inline std::string lowerCase(const std::string& str) inline std::string lowerCase(const std::string& str)
{ {
std::string s = str; std::string s = str;
// TODO: Why can't I specify std::tolower? // 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; return s;
} }