Mercurial > jwe > octave
diff libinterp/corefcn/regexp.cc @ 23804:8057d3f0673d
Use C++11 raw string literals to avoid escaping backslashes in strings.
* file-editor-tab.cc, octave-qscintilla.cc, graphics.cc, help.cc, input.cc,
oct-stream.cc, regexp.cc, sparse-xdiv.cc, sysdep.cc, utils.cc, xdiv.cc,
ov-java.cc, ov.cc, file-ops.cc, lo-sysdep.cc, oct-env.cc, mkoctfile.in.cc,
shared-fcns.h:
Replace regular strings containing "\\" patterns with R"(...\...)".
author | Rik <rik@octave.org> |
---|---|
date | Fri, 28 Jul 2017 11:19:36 -0700 |
parents | cda0614beaec |
children | d9ca3f15f739 |
line wrap: on
line diff
--- a/libinterp/corefcn/regexp.cc Fri Jul 28 10:34:33 2017 -0700 +++ b/libinterp/corefcn/regexp.cc Fri Jul 28 11:19:36 2017 -0700 @@ -109,7 +109,7 @@ { bad_esc_seq = true; tmpi = 0; - warning ("malformed octal escape sequence '\\o' -- converting to '\\0'"); + warning (R"(malformed octal escape sequence '\o' -- converting to '\0')"); } retval[i] = tmpi; j = k - 1; @@ -204,7 +204,7 @@ } if (bad_esc_seq || (brace && s[k++] != '}')) { - warning ("malformed octal escape sequence '\\o' -- converting to '\\0'"); + warning (R"(malformed octal escape sequence '\o' -- converting to '\0')"); tmpi = 0; } retval[i] = tmpi; @@ -241,7 +241,7 @@ } if (bad_esc_seq || (brace && s[k++] != '}')) { - warning ("malformed hex escape sequence '\\x' -- converting to '\\0'"); + warning (R"(malformed hex escape sequence '\x' -- converting to '\0')"); tmpi = 0; } retval[i] = tmpi;