Removed redundant nullpointer checks in token.cpp

This commit is contained in:
PKEuS 2012-09-09 14:34:07 +02:00
parent 1968b6ffe0
commit a748678636
1 changed files with 2 additions and 2 deletions

View File

@ -296,7 +296,7 @@ const Token *Token::linkAt(int index) const
if (!tok) { if (!tok) {
throw InternalError(this, "Internal error. Token::linkAt called with index outside the tokens range."); throw InternalError(this, "Internal error. Token::linkAt called with index outside the tokens range.");
} }
return tok ? tok->link() : 0; return tok->link();
} }
Token *Token::linkAt(int index) Token *Token::linkAt(int index)
@ -305,7 +305,7 @@ Token *Token::linkAt(int index)
if (!tok) { if (!tok) {
throw InternalError(this, "Internal error. Token::linkAt called with index outside the tokens range."); throw InternalError(this, "Internal error. Token::linkAt called with index outside the tokens range.");
} }
return tok ? tok->link() : 0; return tok->link();
} }
const std::string &Token::strAt(int index) const const std::string &Token::strAt(int index) const