diff --git a/src/util.hpp b/src/util.hpp index f59d308f4..78e97eac2 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -60,7 +60,7 @@ class Util { static std::string HexStr(const uint8_t* data, size_t len) { std::stringstream s; s << std::hex; - for (int i=0; i < len; ++i) + for (size_t i=0; i < len; ++i) s << std::setw(2) << std::setfill('0') << static_cast(data[i]); return s.str(); } @@ -68,7 +68,7 @@ class Util { static std::string HexStr(const std::vector &data) { std::stringstream s; s << std::hex; - for (int i=0; i < data.size(); ++i) + for (size_t i=0; i < data.size(); ++i) s << std::setw(2) << std::setfill('0') << static_cast(data[i]); return s.str(); }