logic: reduce access to filesystem while indexing
* use canonical filepath cache in cxx indexer * made constructors of FilePath explicit * use FilePath at more places instead of string * forward declares FilePath wherever possible
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "utility/utilityMaven.h"
|
||||
|
||||
#include "utility/file/FilePath.h"
|
||||
#include "utility/text/TextAccess.h"
|
||||
#include "utility/utilityApp.h"
|
||||
#include "utility/utilityString.h"
|
||||
@@ -61,12 +62,12 @@ namespace utility
|
||||
|
||||
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("project", "build", "directory")))
|
||||
{
|
||||
uncheckedDirectories.push_back(FilePath(value).concat("generated-sources"));
|
||||
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-sources")));
|
||||
}
|
||||
|
||||
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("projects", "project", "build", "directory")))
|
||||
{
|
||||
uncheckedDirectories.push_back(FilePath(value).concat("generated-sources"));
|
||||
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-sources")));
|
||||
}
|
||||
|
||||
if (addTestDirectories)
|
||||
@@ -82,12 +83,12 @@ namespace utility
|
||||
|
||||
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("project", "build", "directory")))
|
||||
{
|
||||
uncheckedDirectories.push_back(FilePath(value).concat("generated-test-sources"));
|
||||
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-test-sources")));
|
||||
}
|
||||
|
||||
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("projects", "project", "build", "directory")))
|
||||
{
|
||||
uncheckedDirectories.push_back(FilePath(value).concat("generated-test-sources"));
|
||||
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-test-sources")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef UTILITY_MAVEN_H
|
||||
#define UTILITY_MAVEN_H
|
||||
|
||||
#include "utility/file/FilePath.h"
|
||||
#include <vector>
|
||||
|
||||
class FilePath;
|
||||
|
||||
namespace utility
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user