mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-29 02:40:47 +02:00
Fix signedness warnings in String.h
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user