summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest-printers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/src/gtest-printers.cc')
-rw-r--r--googletest/src/gtest-printers.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc
index a2df412..dd67f64 100644
--- a/googletest/src/gtest-printers.cc
+++ b/googletest/src/gtest-printers.cc
@@ -180,7 +180,10 @@ static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
*os << static_cast<char>(c);
return kAsIs;
} else {
- *os << "\\x" + String::FormatHexInt(static_cast<UnsignedChar>(c));
+ ostream::fmtflags flags = os->flags();
+ *os << "\\x" << std::hex << std::uppercase
+ << static_cast<int>(static_cast<UnsignedChar>(c));
+ os->flags(flags);
return kHexEscape;
}
}