Mercurial > octave
comparison libinterp/corefcn/graphics.in.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 | 93748bcaec17 |
children | 5e00ed38a58b |
comparison
equal
deleted
inserted
replaced
21020:7ebc9f38b312 | 21021:a5b99b09f8fd |
---|---|
1968 const_iterator find (const std::string pname) const | 1968 const_iterator find (const std::string pname) const |
1969 { | 1969 { |
1970 const_iterator it; | 1970 const_iterator it; |
1971 | 1971 |
1972 for (it = (*this).begin (); it != (*this).end (); it++) | 1972 for (it = (*this).begin (); it != (*this).end (); it++) |
1973 if (pname.compare ((*it).first) == 0) | 1973 if (pname == (*it).first) |
1974 return it; | 1974 return it; |
1975 | 1975 |
1976 return (*this).end (); | 1976 return (*this).end (); |
1977 } | 1977 } |
1978 | 1978 |
1979 iterator find (const std::string pname) | 1979 iterator find (const std::string pname) |
1980 { | 1980 { |
1981 iterator it; | 1981 iterator it; |
1982 | 1982 |
1983 for (it = (*this).begin (); it != (*this).end (); it++) | 1983 for (it = (*this).begin (); it != (*this).end (); it++) |
1984 if (pname.compare ((*it).first) == 0) | 1984 if (pname == (*it).first) |
1985 return it; | 1985 return it; |
1986 | 1986 |
1987 return (*this).end (); | 1987 return (*this).end (); |
1988 } | 1988 } |
1989 | 1989 |