Ran AStyle, removed redundant tokAt(0)
This commit is contained in:
parent
0600b0be8f
commit
43e01a2b1a
|
@ -5950,7 +5950,7 @@ bool Tokenizer::simplifyKnownVariables()
|
||||||
const std::string structname("");
|
const std::string structname("");
|
||||||
const Token * const valueToken = tok2->tokAt(4);
|
const Token * const valueToken = tok2->tokAt(4);
|
||||||
std::string value(valueToken->str());
|
std::string value(valueToken->str());
|
||||||
if ((tok2->tokAt(0))->str() == "sprintf") {
|
if (tok2->str() == "sprintf") {
|
||||||
while ((n = value.find("%%",n+1)) != std::string::npos) {
|
while ((n = value.find("%%",n+1)) != std::string::npos) {
|
||||||
value.replace(n,2,"%");
|
value.replace(n,2,"%");
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ private:
|
||||||
TEST_CASE(simplifyKnownVariables47); // ticket #3627 - >>
|
TEST_CASE(simplifyKnownVariables47); // ticket #3627 - >>
|
||||||
TEST_CASE(simplifyKnownVariables48); // ticket #3754 - wrong simplification in for loop header
|
TEST_CASE(simplifyKnownVariables48); // ticket #3754 - wrong simplification in for loop header
|
||||||
TEST_CASE(simplifyKnownVariables49); // #3691 - continue in switch
|
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(simplifyKnownVariablesIfEq1); // if (a==5) => a is 5 in the block
|
||||||
TEST_CASE(simplifyKnownVariablesIfEq2); // if (a==5) { buf[a++] = 0; }
|
TEST_CASE(simplifyKnownVariablesIfEq2); // if (a==5) { buf[a++] = 0; }
|
||||||
TEST_CASE(simplifyKnownVariablesBailOutAssign1);
|
TEST_CASE(simplifyKnownVariablesBailOutAssign1);
|
||||||
|
|
Loading…
Reference in New Issue