From: Matthew Barr Date: Tue, 12 Jan 2016 03:48:35 +0000 (+1100) Subject: Coverity: Restore output stream format X-Git-Tag: v4.2.0^2~175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39886a09687581dd2b89b214f8f10a8405b0f2d0;p=thirdparty%2Fvectorscan.git Coverity: Restore output stream format --- 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); } }