forked from catchorg/Catch2
Sweep out some Wsign-conversion warnings
This commit is contained in:
@@ -87,7 +87,7 @@ namespace {
|
||||
// (see: http://www.w3.org/TR/xml/#syntax)
|
||||
|
||||
for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {
|
||||
unsigned char c = m_str[idx];
|
||||
unsigned char c = static_cast<unsigned char>(m_str[idx]);
|
||||
switch (c) {
|
||||
case '<': os << "<"; break;
|
||||
case '&': os << "&"; break;
|
||||
@@ -147,7 +147,7 @@ namespace {
|
||||
bool valid = true;
|
||||
uint32_t value = headerValue(c);
|
||||
for (std::size_t n = 1; n < encBytes; ++n) {
|
||||
unsigned char nc = m_str[idx + n];
|
||||
unsigned char nc = static_cast<unsigned char>(m_str[idx + n]);
|
||||
valid &= ((nc & 0xC0) == 0x80);
|
||||
value = (value << 6) | (nc & 0x3F);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user