diff libinterp/corefcn/oct-stream.cc @ 23803:90689bdbe048

Use C++11 raw string literals to avoid escaping double quotes. * parser.cc, workspace-view.cc, __lin_interpn__.cc, cellfun.cc, colloc.cc, data.cc, dirfns.cc, eig.cc, file-io.cc, find.cc, gammainc.cc, gl2ps-print.cc, graphics.cc, graphics.in.h, help.cc, input.cc, load-path.cc, load-save.cc, oct-hist.cc, oct-stream.cc, pager.cc, pr-output.cc, spparms.cc, symtab.cc, toplev.cc, tril.cc, urlwrite.cc, utils.cc, variables.cc, chol.cc, qr.cc, symbfact.cc, ov-struct.cc, octave.cc, pt-id.h, version.cc, mkoctfile.in.cc: Replace regular strings containing "\"" patterns with R"(..."...)".
author Rik <rik@octave.org>
date Fri, 28 Jul 2017 10:34:33 -0700
parents 4f12819a634f
children 8057d3f0673d
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc	Thu Jul 27 21:39:19 2017 -0700
+++ b/libinterp/corefcn/oct-stream.cc	Fri Jul 28 10:34:33 2017 -0700
@@ -3223,20 +3223,20 @@
   {
     skip_whitespace (is);
 
-    if (is.peek () != '\"')
+    if (is.peek () != '"')
       scan_string (is, fmt, val);
     else
       {
         is.get ();
-        scan_caret (is, "\"", val);       // read everything until "
+        scan_caret (is, R"(")", val);     // read everything until "
         is.get ();                        // swallow "
 
-        while (is && is.peek () == '\"')  // if double ", insert one in stream,
+        while (is && is.peek () == '"')  // if double ", insert one in stream,
           {                               // and keep looking for single "
             is.get ();
             std::string val1;
-            scan_caret (is, "\"", val1);
-            val = val + "\"" + val1;
+            scan_caret (is, R"(")", val1);
+            val = val + '"' + val1;
             is.get_undelim ();
           }
       }