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
@@ -31,7 +31,7 @@ bool SourceGroupJava::prepareIndexing()
}
std::vector<std::shared_ptr<IndexerCommand>> SourceGroupJava::getIndexerCommands(
std::set<FilePath>* filesToIndex, bool fullRefresh)
const std::set<FilePath>& filesToIndex, bool fullRefresh)
{
const std::string languageStandard = getSourceGroupSettingsJava()->getStandard();
@@ -44,12 +44,10 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupJava::getIndexerCommands
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<IndexerCommandJava>(sourcePath, indexedPaths, excludedPaths, languageStandard, classPath));
filesToIndex->erase(sourcePath);
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ public:
virtual bool prepareIndexing();
virtual std::vector<std::shared_ptr<IndexerCommand>> getIndexerCommands(
std::set<FilePath>* filesToIndex, bool fullRefresh);
const std::set<FilePath>& filesToIndex, bool fullRefresh);
protected:
virtual std::vector<FilePath> doGetClassPath();