Commit e347ef30 authored by aligungr's avatar aligungr

CLI improvements

parent 60f7a27e
...@@ -50,7 +50,10 @@ template <typename T> ...@@ -50,7 +50,10 @@ template <typename T>
static std::string IntToHex(T i) static std::string IntToHex(T i)
{ {
std::stringstream stream; std::stringstream stream;
stream << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << i; if constexpr (sizeof(T) == 1)
stream << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << static_cast<int>(i);
else
stream << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << i;
return stream.str(); return stream.str();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment