From 921a6b41c5424d41d1c7c0bb50e2732980ce6e59 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 22 Oct 2022 10:19:47 +0800 Subject: [PATCH] clean up CppPreprocessor::addDefinesInFile --- RedPandaIDE/parser/cpppreprocessor.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/RedPandaIDE/parser/cpppreprocessor.cpp b/RedPandaIDE/parser/cpppreprocessor.cpp index 6c007083..3c91570f 100644 --- a/RedPandaIDE/parser/cpppreprocessor.cpp +++ b/RedPandaIDE/parser/cpppreprocessor.cpp @@ -872,19 +872,6 @@ void CppPreprocessor::addDefinesInFile(const QString &fileName) return; mProcessed.insert(fileName); - //todo: why test this? - if (!mScannedFiles.contains(fileName)) - return; - - //May be redefined, so order is important - //first add the defines in the files it included - PFileIncludes fileIncludes = getFileIncludesEntry(fileName); - if (fileIncludes) { - foreach (const QString& s,fileIncludes->includeFiles.keys()) { - addDefinesInFile(s); - } - } - // then add the defines defined in it PDefineMap defineList = mFileDefines.value(fileName, PDefineMap()); if (defineList) {