SymbolDatabase: Code cleanup

This commit is contained in:
Daniel Marjamäki 2016-05-26 12:00:03 +02:00
parent 66cacde3db
commit f45233682e
1 changed files with 1 additions and 20 deletions

View File

@ -3279,27 +3279,8 @@ const Token * Scope::addEnum(const Token * tok, bool isCpp)
}
}
// look for single token enumerators
if (enumerator.start == enumerator.end) {
// check if token is a number
if (enumerator.start->isNumber()) {
enumerator.value = MathLib::toLongNumber(enumerator.start->str());
enumerator.value_known = true;
value = enumerator.value + 1;
}
// check if token is an enumerator
else if (enumerator.start->isEnumerator()) {
if (enumerator.start->enumerator()->value_known) {
enumerator.value = enumerator.start->enumerator()->value;
enumerator.value_known = true;
value = enumerator.value + 1;
}
}
}
// look for possible constant folding expressions
else if (enumerator.start) {
if (enumerator.start) {
// rhs of operator:
const Token *rhs = enumerator.start->previous()->astOperand2();