Remove check for "this" inside Token class

The check hides real memory problems and is
also useless in most cases.
This commit is contained in:
Thomas Jarosch 2011-11-11 17:19:08 +01:00
parent 5a35beebf7
commit 283c2e508e
1 changed files with 2 additions and 8 deletions

View File

@ -155,12 +155,9 @@ public:
_isNumber = number;
}
bool isArithmeticalOp() const {
return (this && (_str=="<<" || _str==">>" || (_str.size()==1 && _str.find_first_of("+-*/%") != std::string::npos)));
return (_str=="<<" || _str==">>" || (_str.size()==1 && _str.find_first_of("+-*/%") != std::string::npos));
}
bool isOp() const {
if (!this)
return false;
return (isArithmeticalOp() ||
_str == "&&" ||
_str == "||" ||
@ -174,12 +171,9 @@ public:
}
bool isExtendedOp() const {
return isOp() ||
(this && _str.size() == 1 && _str.find_first_of(",[]()?:") != std::string::npos);
(_str.size() == 1 && _str.find_first_of(",[]()?:") != std::string::npos);
}
bool isAssignmentOp() const {
if (!this)
return false;
return (_str == "=" ||
_str == "+=" ||
_str == "-=" ||