logic: Fixed files within indexed directories always refreshed in empty C/C++ source groups
This commit is contained in:
@@ -34,8 +34,8 @@ std::set<FilePath> SourceGroupCxxEmpty::filterToContainedFilePaths(const std::se
|
||||
|
||||
return utility::filterToContainedFilePaths(
|
||||
filePaths,
|
||||
utility::toSet(indexedPaths),
|
||||
std::set<FilePath>(),
|
||||
utility::toSet(indexedPaths),
|
||||
excludeFilters
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,36 +1,29 @@
|
||||
#include "utility/utilitySourceGroupCxx.h"
|
||||
|
||||
std::set<FilePath> utility::filterToContainedFilePaths(
|
||||
const std::set<FilePath> filePaths,
|
||||
const std::set<FilePath>& indexedSourcePaths,
|
||||
const std::set<FilePath>& indexedHeaderPaths,
|
||||
const std::vector<FilePathFilter> excludeFilters)
|
||||
const std::set<FilePath>& filePaths,
|
||||
const std::set<FilePath>& indexedFilePaths,
|
||||
const std::set<FilePath>& indexedFileOrDirectoryPaths,
|
||||
const std::vector<FilePathFilter>& excludeFilters)
|
||||
{
|
||||
std::set<FilePath> containedFilePaths;
|
||||
|
||||
for (const FilePath& filePath : filePaths)
|
||||
{
|
||||
bool isInIndexedPaths = false;
|
||||
|
||||
for (const FilePath& indexedFileOrDirectoryPath : indexedFileOrDirectoryPaths)
|
||||
{
|
||||
for (const FilePath& indexedHeaderPath : indexedHeaderPaths)
|
||||
if (indexedFileOrDirectoryPath == filePath || indexedFileOrDirectoryPath.contains(filePath))
|
||||
{
|
||||
if (indexedHeaderPath == filePath || indexedHeaderPath.contains(filePath))
|
||||
{
|
||||
isInIndexedPaths = true;
|
||||
break;
|
||||
}
|
||||
isInIndexedPaths = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isInIndexedPaths)
|
||||
|
||||
if (!isInIndexedPaths && indexedFilePaths.find(filePath) != indexedFilePaths.end())
|
||||
{
|
||||
for (const FilePath& indexedSourcePath : indexedSourcePaths)
|
||||
{
|
||||
if (indexedSourcePath == filePath)
|
||||
{
|
||||
isInIndexedPaths = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
isInIndexedPaths = true;
|
||||
}
|
||||
|
||||
if (isInIndexedPaths)
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
namespace utility
|
||||
{
|
||||
std::set<FilePath> filterToContainedFilePaths(
|
||||
const std::set<FilePath> filePaths,
|
||||
const std::set<FilePath>& indexedSourcePaths,
|
||||
const std::set<FilePath>& indexedHeaderPaths,
|
||||
const std::vector<FilePathFilter> excludeFilters);
|
||||
const std::set<FilePath>& filePaths,
|
||||
const std::set<FilePath>& indexedFilePaths,
|
||||
const std::set<FilePath>& indexedFileOrDirectoryPaths,
|
||||
const std::vector<FilePathFilter>& excludeFilters);
|
||||
}
|
||||
|
||||
#endif // UTILITY_SOURCE_GROUP_CXX_H
|
||||
|
||||
Reference in New Issue
Block a user