[clang-tidy] use raw strings for easier readability (#882)

Found with modernize-raw-string-literal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-06-15 13:29:38 -07:00
committed by GitHub
parent f05947ae59
commit 4f6d0733c9
2 changed files with 6 additions and 6 deletions

View File

@@ -366,15 +366,15 @@ bool WriteChar(ostream_wrapper& out, char ch) {
if (('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')) {
out << ch;
} else if (ch == '\"') {
out << "\"\\\"\"";
out << R"("\"")";
} else if (ch == '\t') {
out << "\"\\t\"";
out << R"("\t")";
} else if (ch == '\n') {
out << "\"\\n\"";
out << R"("\n")";
} else if (ch == '\b') {
out << "\"\\b\"";
out << R"("\b")";
} else if (ch == '\\') {
out << "\"\\\\\"";
out << R"("\\")";
} else if (0x20 <= ch && ch <= 0x7e) {
out << "\"" << ch << "\"";
} else {

View File

@@ -105,7 +105,7 @@ std::string Escape(Stream& in) {
case 'e':
return "\x1B";
case ' ':
return "\x20";
return R"( )";
case '\"':
return "\"";
case '\'':