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(
|
return utility::filterToContainedFilePaths(
|
||||||
filePaths,
|
filePaths,
|
||||||
utility::toSet(indexedPaths),
|
|
||||||
std::set<FilePath>(),
|
std::set<FilePath>(),
|
||||||
|
utility::toSet(indexedPaths),
|
||||||
excludeFilters
|
excludeFilters
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +1,29 @@
|
|||||||
#include "utility/utilitySourceGroupCxx.h"
|
#include "utility/utilitySourceGroupCxx.h"
|
||||||
|
|
||||||
std::set<FilePath> utility::filterToContainedFilePaths(
|
std::set<FilePath> utility::filterToContainedFilePaths(
|
||||||
const std::set<FilePath> filePaths,
|
const std::set<FilePath>& filePaths,
|
||||||
const std::set<FilePath>& indexedSourcePaths,
|
const std::set<FilePath>& indexedFilePaths,
|
||||||
const std::set<FilePath>& indexedHeaderPaths,
|
const std::set<FilePath>& indexedFileOrDirectoryPaths,
|
||||||
const std::vector<FilePathFilter> excludeFilters)
|
const std::vector<FilePathFilter>& excludeFilters)
|
||||||
{
|
{
|
||||||
std::set<FilePath> containedFilePaths;
|
std::set<FilePath> containedFilePaths;
|
||||||
|
|
||||||
for (const FilePath& filePath : filePaths)
|
for (const FilePath& filePath : filePaths)
|
||||||
{
|
{
|
||||||
bool isInIndexedPaths = false;
|
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;
|
isInIndexedPaths = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!isInIndexedPaths)
|
if (!isInIndexedPaths && indexedFilePaths.find(filePath) != indexedFilePaths.end())
|
||||||
{
|
|
||||||
for (const FilePath& indexedSourcePath : indexedSourcePaths)
|
|
||||||
{
|
|
||||||
if (indexedSourcePath == filePath)
|
|
||||||
{
|
{
|
||||||
isInIndexedPaths = true;
|
isInIndexedPaths = true;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isInIndexedPaths)
|
if (isInIndexedPaths)
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
namespace utility
|
namespace utility
|
||||||
{
|
{
|
||||||
std::set<FilePath> filterToContainedFilePaths(
|
std::set<FilePath> filterToContainedFilePaths(
|
||||||
const std::set<FilePath> filePaths,
|
const std::set<FilePath>& filePaths,
|
||||||
const std::set<FilePath>& indexedSourcePaths,
|
const std::set<FilePath>& indexedFilePaths,
|
||||||
const std::set<FilePath>& indexedHeaderPaths,
|
const std::set<FilePath>& indexedFileOrDirectoryPaths,
|
||||||
const std::vector<FilePathFilter> excludeFilters);
|
const std::vector<FilePathFilter>& excludeFilters);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // UTILITY_SOURCE_GROUP_CXX_H
|
#endif // UTILITY_SOURCE_GROUP_CXX_H
|
||||||
|
|||||||
Reference in New Issue
Block a user