summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authordmauro <dmauro@google.com>2020-06-05 14:37:26 (GMT)
committervslashg <gfalcon@google.com>2020-06-10 21:37:14 (GMT)
commit1b0cdaae57c046c87fb99cb4f69c312a7e794adb (patch)
tree2b25f27641a0ff0ee12598508d93cea054c61a50 /googletest
parent4fe018038f87675c083d0cfb6a6b57c274fb1753 (diff)
downloadgoogletest-1b0cdaae57c046c87fb99cb4f69c312a7e794adb.zip
googletest-1b0cdaae57c046c87fb99cb4f69c312a7e794adb.tar.gz
googletest-1b0cdaae57c046c87fb99cb4f69c312a7e794adb.tar.bz2
Googletest export
Add missing static_cast to char32_t printer PiperOrigin-RevId: 314925583
Diffstat (limited to 'googletest')
-rw-r--r--googletest/src/gtest-printers.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc
index ce1b2af..20ce1b8 100644
--- a/googletest/src/gtest-printers.cc
+++ b/googletest/src/gtest-printers.cc
@@ -44,6 +44,7 @@
#include "gtest/gtest-printers.h"
#include <stdio.h>
#include <cctype>
+#include <cstdint>
#include <cwchar>
#include <ostream> // NOLINT
#include <string>
@@ -253,7 +254,7 @@ void PrintTo(wchar_t wc, ostream* os) {
void PrintTo(char32_t c, ::std::ostream* os) {
*os << std::hex << "U+" << std::uppercase << std::setfill('0') << std::setw(4)
- << c;
+ << static_cast<uint32_t>(c);
}
// Prints the given array of characters to the ostream. CharType must be either