src: implemented move constructor/assignment for filepath
* improves indexing performance by roughly 5% * switched to use uniqu_ptr for boost path to get rid of including boost in header * added different methods to change the current FilePath or to make a copy and change that one * used these methods appropriately throughout the code base * removed exists() method from FileSystem because it is already contained in FilePath * added const in some places
This commit is contained in:
@@ -19,7 +19,7 @@ namespace
|
||||
if (getenv("JAVA_HOME") == nullptr)
|
||||
{
|
||||
const FilePath javaPath(ApplicationSettings::getInstance()->getJavaPath());
|
||||
const FilePath javaHomePath = javaPath.parentDirectory().parentDirectory().parentDirectory();
|
||||
const FilePath javaHomePath = javaPath.getParentDirectory().getParentDirectory().getParentDirectory();
|
||||
|
||||
LOG_WARNING("Environment variable \"JAVA_HOME\" not found on system. Setting value to \"" + javaHomePath.str() + "\" for this process.");
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace
|
||||
FilePath path(fetchedDirectory);
|
||||
if (!toAppend.empty())
|
||||
{
|
||||
path = path.concat(toAppend);
|
||||
path.concatenate(toAppend);
|
||||
}
|
||||
pathList.push_back(path);
|
||||
LOG_INFO("Found directory \"" + path.str() + "\".");
|
||||
@@ -51,7 +51,7 @@ namespace
|
||||
if (getenv("JAVA_HOME") == nullptr)
|
||||
{
|
||||
const FilePath javaPath(ApplicationSettings::getInstance()->getJavaPath());
|
||||
const FilePath javaHomePath = javaPath.parentDirectory().parentDirectory().parentDirectory();
|
||||
const FilePath javaHomePath = javaPath.getParentDirectory().getParentDirectory().getParentDirectory();
|
||||
|
||||
LOG_WARNING("Environment variable \"JAVA_HOME\" not found on system. Setting value to \"" + javaHomePath.str() + "\" for this process.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user