templatesimplifier: remove redundant assignments inside switchcase. They will always be overwritten by an assignment outside of the switch near the end of the function. Found by clang analyzer.
This commit is contained in:
parent
d846217641
commit
92d9e810f3
|
@ -935,23 +935,18 @@ bool TemplateSimplifier::simplifyNumericCalculations(Token *tok)
|
||||||
switch (op->str()[0]) {
|
switch (op->str()[0]) {
|
||||||
case '<':
|
case '<':
|
||||||
tok->str((v1 << v2).str());
|
tok->str((v1 << v2).str());
|
||||||
ret = true;
|
|
||||||
break;
|
break;
|
||||||
case '>':
|
case '>':
|
||||||
tok->str((v1 >> v2).str());
|
tok->str((v1 >> v2).str());
|
||||||
ret = true;
|
|
||||||
break;
|
break;
|
||||||
case '&':
|
case '&':
|
||||||
tok->str((v1 & v2).str());
|
tok->str((v1 & v2).str());
|
||||||
ret = true;
|
|
||||||
break;
|
break;
|
||||||
case '|':
|
case '|':
|
||||||
tok->str((v1 | v2).str());
|
tok->str((v1 | v2).str());
|
||||||
ret = true;
|
|
||||||
break;
|
break;
|
||||||
case '^':
|
case '^':
|
||||||
tok->str((v1 ^ v2).str());
|
tok->str((v1 ^ v2).str());
|
||||||
ret = true;
|
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue