clean up code

This commit is contained in:
Roy Qu 2022-10-22 08:46:27 +08:00
parent 8378857157
commit 51d0f2c2aa
3 changed files with 0 additions and 6 deletions

View File

@ -1155,7 +1155,6 @@ PStatement CppParser::addInheritedStatement(const PStatement& derived, const PSt
access,
true,
inherit->isStatic);
statement->inheritanceList.append(inherit->inheritanceList),
statement->isInherited = true;
return statement;
}
@ -1243,7 +1242,6 @@ PStatement CppParser::addStatement(const PStatement& parent,
result->noNameArgs = noNameArgs;
result->value = value;
result->kind = kind;
//result->inheritanceList;
result->scope = scope;
result->classScope = classScope;
result->hasDefinition = isDefinition;
@ -1288,7 +1286,6 @@ PStatement CppParser::addStatement(const PStatement& parent,
void CppParser::setInheritance(int index, const PStatement& classStatement, bool isStruct)
{
// Clear it. Assume it is assigned
classStatement->inheritanceList.clear();
StatementClassScope lastInheritScopeType = StatementClassScope::scsNone;
// Assemble a list of statements in text form we inherit from
while (true) {
@ -1308,7 +1305,6 @@ void CppParser::setInheritance(int index, const PStatement& classStatement, bool
PStatement statement = findStatementOf(mCurrentFile,basename,
classStatement->parentScope.lock(),true);
if (statement && statement->kind == StatementKind::skClass) {
classStatement->inheritanceList.append(statement);
inheritClassStatement(classStatement,isStruct,statement,lastInheritScopeType);
}
}

View File

@ -97,7 +97,6 @@ private:
void skipToEndOfPreprocessor();
void skipToPreprocessor();
QString getNextPreprocessor();
void simplify(QString& output);
void handleBranch(const QString& line);
void handleDefine(const QString& line);
void handleInclude(const QString& line, bool fromNext=false);

View File

@ -149,7 +149,6 @@ struct Statement {
QString args; // args "(int a,float b)"
QString value; // Used for macro defines/typedef, "100" in "#defin COUNT 100"
StatementKind kind; // kind of statement class/variable/function/etc
QList<std::weak_ptr<Statement>> inheritanceList; // list of statements this one inherits from, can be nil
StatementScope scope; // global/local/classlocal
StatementClassScope classScope; // protected/private/public
bool hasDefinition; // definiton line/filename is valid