fix vc2017 compile warning 'unsigned int' to 'const char'
This commit is contained in:
parent
1126812f8f
commit
33f99e9c70
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user