From 3345e2a2cc16e209f6e37caffe581b40e6ed19bb Mon Sep 17 00:00:00 2001 From: Matthias Maennich Date: Wed, 4 Oct 2017 19:02:56 +0200 Subject: cmcmd: let operator<< for NumberFormatter reset the stream's format flags --- Source/cmcmd.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index c0c7d03..ed507fd 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -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& command, -- cgit v0.12