From a748678636a1cf77b78f7c0e525068e7cf4cf549 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sun, 9 Sep 2012 14:34:07 +0200 Subject: [PATCH] Removed redundant nullpointer checks in token.cpp --- lib/token.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/token.cpp b/lib/token.cpp index 428547550..f67706418 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -296,7 +296,7 @@ const Token *Token::linkAt(int index) const if (!tok) { 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) @@ -305,7 +305,7 @@ Token *Token::linkAt(int index) if (!tok) { 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