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:
Matthias Krüger 2017-01-30 22:26:54 +01:00
parent d846217641
commit 92d9e810f3
1 changed files with 0 additions and 5 deletions

View File

@ -935,23 +935,18 @@ bool TemplateSimplifier::simplifyNumericCalculations(Token *tok)
switch (op->str()[0]) {
case '<':
tok->str((v1 << v2).str());
ret = true;
break;
case '>':
tok->str((v1 >> v2).str());
ret = true;
break;
case '&':
tok->str((v1 & v2).str());
ret = true;
break;
case '|':
tok->str((v1 | v2).str());
ret = true;
break;
case '^':
tok->str((v1 ^ v2).str());
ret = true;
break;
};
}