From: André Pönitz Date: Fri, 17 Aug 2001 10:51:50 +0000 (+0000) Subject: Token::operator!=() X-Git-Tag: 1.6.10~20815 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8ccadb0c78a3966dc82380126e0437ae2bc0589a;p=lyx.git Token::operator!=() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2530 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 3f49ad9592..a9dd1d1f91 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -176,6 +176,8 @@ public: /// bool operator==(Token const & t) const; /// + bool operator!=(Token const & t) const; + /// string const & cs() const { return cs_; } /// CatCode cat() const { return cat_; } @@ -203,6 +205,11 @@ bool Token::operator==(Token const & t) const return char_ == t.char_ && cat_ == t.cat_ && cs_ == t.cs_; } +bool Token::operator!=(Token const & t) const +{ + return char_ != t.char_ && cat_ != t.cat_ && cs_ != t.cs_; +} + ostream & operator<<(ostream & os, Token const & t) { if (t.cs().size()) @@ -401,7 +408,7 @@ void Parser::tokenize(string const & buffer) if (catcode(c) == catNewline) ; //push_back(Token("par")); else { - push_back(Token(' ',catSpace)); + push_back(Token(' ', catSpace)); is.putback(c); } break;