Commit 1b0cdaae authored by dmauro's avatar dmauro Committed by vslashg
Browse files

Googletest export

Add missing static_cast to char32_t printer

PiperOrigin-RevId: 314925583
parent 4fe01803
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "gtest/gtest-printers.h" #include "gtest/gtest-printers.h"
#include <stdio.h> #include <stdio.h>
#include <cctype> #include <cctype>
#include <cstdint>
#include <cwchar> #include <cwchar>
#include <ostream> // NOLINT #include <ostream> // NOLINT
#include <string> #include <string>
...@@ -253,7 +254,7 @@ void PrintTo(wchar_t wc, ostream* os) { ...@@ -253,7 +254,7 @@ void PrintTo(wchar_t wc, ostream* os) {
void PrintTo(char32_t c, ::std::ostream* os) { void PrintTo(char32_t c, ::std::ostream* os) {
*os << std::hex << "U+" << std::uppercase << std::setfill('0') << std::setw(4) *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 // Prints the given array of characters to the ostream. CharType must be either
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment