[3PP] Uplift utfcpp
This commit is contained in:
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -42,7 +42,7 @@
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
[submodule "third_party/utfcpp"]
|
||||
path = third_party/utfcpp
|
||||
url = https://github.com/xenia-project/utfcpp.git
|
||||
url = https://github.com/nemtrif/utfcpp.git
|
||||
[submodule "third_party/fmt"]
|
||||
path = third_party/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "xenia/base/cvar.h"
|
||||
#include <iostream>
|
||||
#define UTF_CPP_CPLUSPLUS 201703L
|
||||
#define UTF_CPP_CPLUSPLUS 202002L
|
||||
#include "third_party/utfcpp/source/utf8.h"
|
||||
|
||||
#include "xenia/base/console.h"
|
||||
@@ -125,9 +125,9 @@ std::string EscapeBasicString(const std::string_view view) {
|
||||
result += "\\\\";
|
||||
} else if (c < 0x20 || c == 0x7F) {
|
||||
if (c <= 0xFFFF) {
|
||||
result += fmt::format("\\u{:04X}", c);
|
||||
result += fmt::format("\\u{:04X}", static_cast<uint32_t>(c));
|
||||
} else {
|
||||
result += fmt::format("\\u{:08X}", c);
|
||||
result += fmt::format("\\u{:08X}", static_cast<uint32_t>(c));
|
||||
}
|
||||
} else {
|
||||
utfcpp::append(static_cast<char32_t>(c), result);
|
||||
@@ -159,7 +159,7 @@ std::string EscapeMultilineBasicString(const std::string_view view) {
|
||||
if (c == '\b') {
|
||||
result += "\\b";
|
||||
} else if (c == '\t' || c == '\n') {
|
||||
result += c;
|
||||
result += static_cast<uint32_t>(c);
|
||||
} else if (c == '\f') {
|
||||
result += "\\f";
|
||||
} else if (c == '\r') {
|
||||
@@ -171,9 +171,9 @@ std::string EscapeMultilineBasicString(const std::string_view view) {
|
||||
result += "\\\\";
|
||||
} else if (c < 0x20 || c == 0x7F) {
|
||||
if (c <= 0xFFFF) {
|
||||
result += fmt::format("\\u{:04X}", c);
|
||||
result += fmt::format("\\u{:04X}", static_cast<uint32_t>(c));
|
||||
} else {
|
||||
result += fmt::format("\\u{:08X}", c);
|
||||
result += fmt::format("\\u{:08X}", static_cast<uint32_t>(c));
|
||||
}
|
||||
} else {
|
||||
utfcpp::append(static_cast<char32_t>(c), result);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <strings.h>
|
||||
#endif // !XE_PLATFORM_WIN32
|
||||
|
||||
#define UTF_CPP_CPLUSPLUS 201703L
|
||||
#define UTF_CPP_CPLUSPLUS 202002L
|
||||
#include "third_party/utfcpp/source/utf8.h"
|
||||
|
||||
namespace utfcpp = utf8;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <numeric>
|
||||
#include <tuple>
|
||||
|
||||
#define UTF_CPP_CPLUSPLUS 201703L
|
||||
#define UTF_CPP_CPLUSPLUS 202002L
|
||||
#include "third_party/utfcpp/source/utf8.h"
|
||||
|
||||
namespace utfcpp = utf8;
|
||||
|
||||
2
third_party/utfcpp
vendored
2
third_party/utfcpp
vendored
Submodule third_party/utfcpp updated: f295c4b9a1...65701fe007
Reference in New Issue
Block a user