Commit 3345e2a2 authored by Matthias Männich's avatar Matthias Männich
Browse files

cmcmd: let operator<< for NumberFormatter reset the stream's format flags

parent 4ffa4ddd
......@@ -1556,11 +1556,13 @@ struct NumberFormatter
std::ostream& operator<<(std::ostream& stream,
NumberFormatter const& formatter)
{
auto const& flags = stream.flags();
if (formatter.Format == FORMAT_DECIMAL) {
stream << formatter.Value;
stream << std::dec << formatter.Value;
} else {
stream << "0x" << std::hex << formatter.Value;
}
stream.flags(flags);
return stream;
}
static bool RunCommand(const char* comment, std::vector<std::string>& command,
......
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