Mercurial > octave
diff libinterp/corefcn/ls-oct-text.h @ 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 | f7084eae3318 |
children | 538b57866b90 |
line wrap: on
line diff
--- a/libinterp/corefcn/ls-oct-text.h Thu Dec 31 12:01:01 2015 +0100 +++ b/libinterp/corefcn/ls-oct-text.h Thu Dec 31 13:39:25 2015 -0800 @@ -93,7 +93,7 @@ buf << c; std::string tmp = buf.str (); - bool match = (tmp.compare (0, strlen (keyword), keyword) == 0); + bool match = (tmp.substr (0, strlen (keyword)) == keyword); if (match) {