diff libinterp/corefcn/load-path.cc @ 21021:a5b99b09f8fd

maint: Use comparison operators rather than compare() for strings. * graphics.cc, graphics.in.h, load-path.cc, ls-oct-text.cc, ls-oct-text.h, __init_fltk__.cc, oct-parse.in.yy, file-ops.cc: Use comparison operators rather than compare() for strings.
author Rik <rik@octave.org>
date Thu, 31 Dec 2015 13:39:25 -0800
parents 93748bcaec17
children 49852ff04747
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Thu Dec 31 12:01:01 2015 +0100
+++ b/libinterp/corefcn/load-path.cc	Thu Dec 31 13:39:25 2015 -0800
@@ -1416,7 +1416,7 @@
 
           if (dname_len > dir_len
               && file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
-              && dir.compare (dname.substr (dname_len - dir_len)) == 0)
+              && dir == dname.substr (dname_len - dir_len))
             {
               file_stat fs (p->dir_name);
 
@@ -1463,7 +1463,7 @@
 
           if (dname_len > dir_len
               && file_ops::is_dir_sep (dname[dname_len - dir_len - 1])
-              && dir.compare (dname.substr (dname_len - dir_len)) == 0)
+              && dir == dname.substr (dname_len - dir_len))
             {
               file_stat fs (p->dir_name);