diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-10-04 14:15:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-04 14:15:51 -0400 |
| commit | 97bb82ebcdf8f1391b9d93b5a8d7b1dfc4e88e52 (patch) | |
| tree | f120ba282cbea96d23ed179737984a4610d3b520 /source/core/slang-string-escape-util.cpp | |
| parent | b3dfe383c6d31ff3dbd76dcfb32de8d536382f3e (diff) | |
Removing exceptions from core/compiler-core (#1953)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Refactor Stream. Working on all tests.
* Split out CharEncode.
* Make method names lower camel.
m_prefix in Writer/Reader
* Tidy up around CharEncode interface.
* Small improvements around encode/decode.
* Better use of types.
* Remove readLine from TextReader.
* Remove exceptions from Stream/Text handling.
* Fix some typos.
* Fix tabbing.
* Fix missing override.
* Remove remaining exception throw/catch via using signal mechanism.
* Remove exceptions that are not used anymore.
* Document the Stream interface.
* Remove index for decoding 'get byte' function.
* Fix CharReader -> ByteReader.
Diffstat (limited to 'source/core/slang-string-escape-util.cpp')
| -rw-r--r-- | source/core/slang-string-escape-util.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/core/slang-string-escape-util.cpp b/source/core/slang-string-escape-util.cpp index ffc43a7cb..513908c4c 100644 --- a/source/core/slang-string-escape-util.cpp +++ b/source/core/slang-string-escape-util.cpp @@ -351,8 +351,7 @@ SlangResult CppStringEscapeHandler::appendUnescaped(const UnownedStringSlice& sl const Index maxUtf8EncodeCount = 6; char* chars = out.prepareForAppend(maxUtf8EncodeCount); - - int numChars = EncodeUnicodePointToUTF8(chars, int(value)); + int numChars = encodeUnicodePointToUTF8(Char32(value), chars); out.appendInPlace(chars, numChars); start = cur; @@ -812,7 +811,7 @@ SlangResult JSONStringEscapeHandler::appendUnescaped(const UnownedStringSlice& s // Need to encode in UTF8 to concat char buf[8]; - int len = EncodeUnicodePointToUTF8(buf, value); + int len = encodeUnicodePointToUTF8(Char32(value), buf); out.append(buf, buf + len); |
