Fix -Wsign-conversion error by adding static_cast

This commit is contained in:
daquexian 2019-05-02 21:47:49 +08:00
parent 9997a830ee
commit ca642a925e

View File

@ -237,7 +237,7 @@ void PrintCharAndCodeTo(Char c, ostream* os) {
if (format == kHexEscape || (1 <= c && c <= 9)) {
// Do nothing.
} else {
*os << ", 0x" << String::FormatHexInt(static_cast<UnsignedChar>(c));
*os << ", 0x" << String::FormatHexInt(static_cast<int>(c));
}
*os << ")";
}