Fix signedness warnings in String.h

This commit is contained in:
mniip 2019-08-18 12:10:01 +03:00
parent e2787e00e5
commit f44d42dde8

View File

@ -509,7 +509,7 @@ public:
std::locale const &loc = std::locale::classic();
String value(*this);
for(value_type &ch : value)
if(ch <= std::numeric_limits<ByteString::value_type>::max())
if(ch <= static_cast<value_type>(std::numeric_limits<ByteString::value_type>::max()))
ch = std::tolower(static_cast<ByteString::value_type>(ch), loc);
return value;
}
@ -519,7 +519,7 @@ public:
std::locale const &loc = std::locale::classic();
String value(*this);
for(value_type &ch : value)
if(ch <= std::numeric_limits<ByteString::value_type>::max())
if(ch <= static_cast<value_type>(std::numeric_limits<ByteString::value_type>::max()))
ch = std::toupper(static_cast<ByteString::value_type>(ch), loc);
return value;
}