Commit b2e55c55 authored by Jason Sanmiya's avatar Jason Sanmiya Committed by Android (Google) Code Review

Merge "Fix Windows warnings." into ub-games-master

parents 3368407a 985de211
...@@ -122,7 +122,7 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) ...@@ -122,7 +122,7 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -fsigned-char") "${CMAKE_CXX_FLAGS} -fsigned-char")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CMAKE_CXX_FLAGS set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++ -Wall -pedantic -Werror \ "${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++ -Wall -pedantic -Werror \
-Wextra") -Wextra")
......
...@@ -148,12 +148,12 @@ static bool EscapeString(const String &s, std::string *_text, const IDLOptions& ...@@ -148,12 +148,12 @@ static bool EscapeString(const String &s, std::string *_text, const IDLOptions&
} else if (ucc <= 0x10FFFF) { } else if (ucc <= 0x10FFFF) {
// Encode Unicode SMP values to a surrogate pair using two \u escapes. // Encode Unicode SMP values to a surrogate pair using two \u escapes.
uint32_t base = ucc - 0x10000; uint32_t base = ucc - 0x10000;
uint16_t highSurrogate = (base >> 10) + 0xD800; auto high_surrogate = (base >> 10) + 0xD800;
uint16_t lowSurrogate = (base & 0x03FF) + 0xDC00; auto low_surrogate = (base & 0x03FF) + 0xDC00;
text += "\\u"; text += "\\u";
text += IntToStringHex(highSurrogate, 4); text += IntToStringHex(high_surrogate, 4);
text += "\\u"; text += "\\u";
text += IntToStringHex(lowSurrogate, 4); text += IntToStringHex(low_surrogate, 4);
} }
// Skip past characters recognized. // Skip past characters recognized.
i = static_cast<uoffset_t>(utf8 - s.c_str() - 1); i = static_cast<uoffset_t>(utf8 - s.c_str() - 1);
......
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