logic: Allow duplicate indexing of source files if the indexer command is different

This commit is contained in:
Eberhard Graether
2017-11-09 17:24:28 +01:00
parent ae37145d22
commit ead9f9a634
10 changed files with 24 additions and 19 deletions
+2 -4
View File
@@ -19,7 +19,7 @@ SourceGroupType SourceGroupCxxEmpty::getType() const
}
std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxEmpty::getIndexerCommands(
std::set<FilePath>* filesToIndex, bool fullRefresh)
const std::set<FilePath>& filesToIndex, bool fullRefresh)
{
std::shared_ptr<ApplicationSettings> appSettings = ApplicationSettings::getInstance();
@@ -59,7 +59,7 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxEmpty::getIndexerComm
std::vector<std::shared_ptr<IndexerCommand>> indexerCommands;
for (const FilePath& sourcePath: sourceFilePathsToIndex)
{
if (filesToIndex->find(sourcePath) != filesToIndex->end())
if (filesToIndex.find(sourcePath) != filesToIndex.end())
{
indexerCommands.push_back(std::make_shared<IndexerCommandCxxManual>(
sourcePath,
@@ -71,8 +71,6 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxEmpty::getIndexerComm
compilerFlags,
m_settings->getShouldApplyAnonymousTypedefTransformation()
));
filesToIndex->erase(sourcePath);
}
}