From 39886a09687581dd2b89b214f8f10a8405b0f2d0 Mon Sep 17 00:00:00 2001 From: Matthew Barr Date: Tue, 12 Jan 2016 14:48:35 +1100 Subject: [PATCH] Coverity: Restore output stream format --- src/util/dump_charclass.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/dump_charclass.cpp b/src/util/dump_charclass.cpp index 2cadc67a..74b45414 100644 --- a/src/util/dump_charclass.cpp +++ b/src/util/dump_charclass.cpp @@ -72,8 +72,10 @@ void describeChar(ostream &os, char c, enum cc_output_t out_type) { } else if (c == 0x0d) { os << backslash << 'r'; } else { + auto fmt(os.flags()); os << backslash << 'x' << std::hex << std::setw(2) - << std::setfill('0') << (unsigned)(c & 0xff) << std::dec; + << std::setfill('0') << (unsigned)(c & 0xff); + os.flags(fmt); } }