Merge pull request #68 from khoitd1997/master

fix sign-compare warning
This commit is contained in:
Toru Niina
2019-06-10 10:49:49 +09:00
committed by GitHub

View File

@@ -45,7 +45,7 @@ inline std::string show_char(const char c)
buf.fill('\0'); buf.fill('\0');
const auto r = std::snprintf( const auto r = std::snprintf(
buf.data(), buf.size(), "0x%02x", static_cast<int>(c) & 0xFF); buf.data(), buf.size(), "0x%02x", static_cast<int>(c) & 0xFF);
assert(r == buf.size() - 1); assert(r == static_cast<int>(buf.size()) - 1);
return std::string(buf.data()); return std::string(buf.data());
} }
} }