From cc7f69da54192a3c68edbb0b6108f0b39b8fee1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 17 Dec 2014 18:27:41 +0100 Subject: [PATCH] fix two internal warnings: [lib/checkuninitvar.cpp:1668]: (style) Call to 'Token::tokAt()' followed by 'Token::str()' can be simplified. [lib/checkuninitvar.cpp:1669]: (style) Call to 'Token::tokAt()' followed by 'Token::str()' can be simplified. --- lib/checkuninitvar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index eb90e1bcf..cdfb7b5ae 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -1665,8 +1665,8 @@ bool CheckUninitVar::isVariableUsage(const Token *vartok, bool pointer, bool all return true; // code like: return foo( variable - if (vartok->tokAt(-3) && vartok->tokAt(-3)->str() == "return" - && vartok->tokAt(-1) && vartok->tokAt(-1)->str() == "(") + if (vartok->tokAt(-3) && vartok->strAt(-3) == "return" + && vartok->tokAt(-1) && vartok->strAt(-1) == "(") return true; // Passing variable to typeof/__alignof__