mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
build: fix MSVS2017 warning
This commit is contained in:
committed by
Alexander Alekhin
parent
a9effeeb35
commit
1f18282f04
@@ -69,9 +69,14 @@ 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(), ::tolower);
|
||||
std::transform(str.begin(), str.end(), str.begin(), char_tolower);
|
||||
std::istringstream is(str);
|
||||
bool b;
|
||||
is >> (str.size() > 1 ? std::boolalpha : std::noboolalpha) >> b;
|
||||
|
||||
Reference in New Issue
Block a user