diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index cb2ddd40..03fba771 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -1877,21 +1877,6 @@ int CppParser::evaluateConstExprTerm(int endIndex, bool &ok) if (statement->kind == StatementKind::skEnum) { result = statement->value.toInt(&ok); break; - } else if (statement->kind == StatementKind::skPreprocessor) { - if (!statement->args.isEmpty()) { - ok=false; - return result; - } - QString macroText = statement->value; - if (macroText.isEmpty()) { - ok=false; - return result; - } - if (isDigitChar(macroText[0])) { - result = evaluateLiteralNumber(endIndex,ok); - } else { - s = macroText; - } } } } else { @@ -2687,12 +2672,8 @@ void CppParser::handleEnum(bool isTypedef) mTokenizer[mIndex+1]->text=="=") { mIndex+=2; if (mIndexstatement->kind == StatementKind::skTypedef) ) { return node->statement->command + node->statement->args + " : " + node->statement->type; - } else if (node->statement->kind == StatementKind::skEnum) { - if (!node->statement->value.isEmpty()) - return node->statement->command + node->statement->args + QString("(%1)").arg(node->statement->value); - else - return node->statement->command; } } + if (node->statement->kind == StatementKind::skEnum) { + if (!node->statement->value.isEmpty()) + return node->statement->command + node->statement->args + QString("(%1)").arg(node->statement->value); + else + return node->statement->command; + } return node->statement->command + node->statement->args; } } else if (role == Qt::ForegroundRole) {