1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

core: std::string more changes

This commit is contained in:
Alexander Alekhin
2018-08-23 18:17:04 +03:00
parent ae8dcdf40d
commit 7f73b105ca
11 changed files with 47 additions and 30 deletions
+1 -6
View File
@@ -72,14 +72,9 @@ static const char* get_type_name(int type)
return "unknown";
}
// std::tolower is int->int
static char char_tolower(char ch)
{
return (char)std::tolower((int)ch);
}
static bool parse_bool(std::string str)
{
std::transform(str.begin(), str.end(), str.begin(), char_tolower);
std::transform(str.begin(), str.end(), str.begin(), details::char_tolower);
std::istringstream is(str);
bool b;
is >> (str.size() > 1 ? std::boolalpha : std::noboolalpha) >> b;