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:
mlangkabel
2017-12-23 10:28:25 +01:00
parent 455c1230b1
commit 8b21d57750
73 changed files with 433 additions and 370 deletions
+4 -4
View File
@@ -126,7 +126,7 @@ std::string ProjectSettings::getProjectName() const
FilePath ProjectSettings::getProjectDirectoryPath() const
{
return getFilePath().parentDirectory();
return getFilePath().getParentDirectory();
}
std::string ProjectSettings::getDescription() const
@@ -204,7 +204,7 @@ std::vector<FilePath> ProjectSettings::makePathsExpandedAndAbsolute(const std::v
std::vector<FilePath> p = expandPaths(paths);
std::vector<FilePath> absPaths;
FilePath basePath = getProjectDirectoryPath();
const FilePath basePath = getProjectDirectoryPath();
for (const FilePath& path : p)
{
if (path.isAbsolute())
@@ -213,7 +213,7 @@ std::vector<FilePath> ProjectSettings::makePathsExpandedAndAbsolute(const std::v
}
else
{
absPaths.push_back(basePath.concat(path).canonical());
absPaths.push_back(basePath.getConcatenated(path).makeCanonical());
}
}
@@ -229,7 +229,7 @@ FilePath ProjectSettings::makePathExpandedAndAbsolute(const FilePath& path) cons
return p;
}
return getProjectDirectoryPath().concat(p).canonical();
return getProjectDirectoryPath().concatenate(p).makeCanonical();
}
SettingsMigrator ProjectSettings::getMigrations() const