changeset 23809:e56d84a16a2e

Fix "no match for 'operator=='" when comparing C++ string to char literal.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 29 Jul 2017 20:57:07 +0200
parents 2b1b2a795ba6
children e8eb1b86e935
files libinterp/corefcn/sysdep.cc liboctave/system/oct-env.cc
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/sysdep.cc	Sat Jul 29 09:17:53 2017 +0200
+++ b/libinterp/corefcn/sysdep.cc	Sat Jul 29 20:57:07 2017 +0200
@@ -584,7 +584,7 @@
   // P_tmpdir, or they define it to a single backslash, neither of which
   // is particularly helpful.
 
-  if (retval.empty () || retval == '\\')
+  if (retval.empty () || retval == R"(\)")
     {
       retval = octave::sys::env::getenv ("TEMP");
 
--- a/liboctave/system/oct-env.cc	Sat Jul 29 09:17:53 2017 +0200
+++ b/liboctave/system/oct-env.cc	Sat Jul 29 20:57:07 2017 +0200
@@ -207,7 +207,7 @@
 
       // Some versions of MinGW and MSVC either don't define P_tmpdir, or
       // define it to a single backslash.  In such cases just use C:\temp.
-      if (tempd.empty () || tempd == '\\')
+      if (tempd.empty () || tempd == R"(\)")
         tempd = R"(c:\temp)";
 
 #else