(operator<<(std::ostream&, const Position&)):

use s.empty() rather than s == "" to test for empty string; see
<http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
(trivial change)
This commit is contained in:
Paul Eggert
2003-07-07 03:46:28 +00:00
parent ddb85ca59e
commit b81a6e01dc

View File

@@ -1019,7 +1019,7 @@ namespace yy
inline std::ostream& inline std::ostream&
operator<< (std::ostream& ostr, const Position& pos) operator<< (std::ostream& ostr, const Position& pos)
{ {
if (pos.filename != "") if (!pos.filename.empty ())
ostr << pos.filename << ':'; ostr << pos.filename << ':';
return ostr << pos.line << '.' << pos.column; return ostr << pos.line << '.' << pos.column;
} }