Escaping chars in a less shitty, but actually compiling for real, way
This commit is contained in:
parent
a740236988
commit
eaf190661f
@ -1700,10 +1700,9 @@ auto write_escaped_char(OutputIt out, Char v) -> OutputIt {
|
|||||||
template <typename OutputIt>
|
template <typename OutputIt>
|
||||||
auto write_escaped_char(OutputIt out, char v) -> OutputIt {
|
auto write_escaped_char(OutputIt out, char v) -> OutputIt {
|
||||||
*out++ = '\'';
|
*out++ = '\'';
|
||||||
if ((needs_escape(v) && v != '"') || v == '\'') {
|
if ((needs_escape(static_cast<uint32_t>(v)) && v != '"') || v == '\'') {
|
||||||
out = write_escaped_cp(out, find_escape_result<char>{
|
out = write_escaped_cp(
|
||||||
&v, &v+1, static_cast<uint32_t>(v)
|
out, find_escape_result<char>{&v, &v + 1, static_cast<uint32_t>(v)});
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
*out++ = v;
|
*out++ = v;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user