Ran AStyle, removed redundant tokAt(0)

This commit is contained in:
PKEuS 2012-08-22 16:51:44 +02:00
parent 0600b0be8f
commit 43e01a2b1a
2 changed files with 2 additions and 2 deletions

View File

@ -5950,7 +5950,7 @@ bool Tokenizer::simplifyKnownVariables()
const std::string structname("");
const Token * const valueToken = tok2->tokAt(4);
std::string value(valueToken->str());
if ((tok2->tokAt(0))->str() == "sprintf") {
if (tok2->str() == "sprintf") {
while ((n = value.find("%%",n+1)) != std::string::npos) {
value.replace(n,2,"%");
}

View File

@ -158,7 +158,7 @@ private:
TEST_CASE(simplifyKnownVariables47); // ticket #3627 - >>
TEST_CASE(simplifyKnownVariables48); // ticket #3754 - wrong simplification in for loop header
TEST_CASE(simplifyKnownVariables49); // #3691 - continue in switch
TEST_CASE(simplifyKnownVariables50); // #4066 sprintf changes
TEST_CASE(simplifyKnownVariables50); // #4066 sprintf changes
TEST_CASE(simplifyKnownVariablesIfEq1); // if (a==5) => a is 5 in the block
TEST_CASE(simplifyKnownVariablesIfEq2); // if (a==5) { buf[a++] = 0; }
TEST_CASE(simplifyKnownVariablesBailOutAssign1);