Feature/path normalization (#1674)

* Path normalization (making sure there are fewer cases of '"..."'
* Using more std::filesystem::path instead of std::string
* Update Ghoul
This commit is contained in:
Alexander Bock
2021-07-01 23:46:22 +02:00
committed by GitHub
parent 20aa307ece
commit 87da9a27ab
56 changed files with 299 additions and 282 deletions
@@ -121,7 +121,7 @@ std::vector<float> HistogramManager::readValues(TSP* tsp, unsigned int brickInde
return voxelValues;
}
bool HistogramManager::loadFromFile(const std::string& filename) {
bool HistogramManager::loadFromFile(const std::filesystem::path& filename) {
std::ifstream file(filename, std::ios::in | std::ios::binary);
if (!file.is_open()) {
return false;
@@ -151,7 +151,7 @@ bool HistogramManager::loadFromFile(const std::string& filename) {
return true;
}
bool HistogramManager::saveToFile(const std::string& filename) {
bool HistogramManager::saveToFile(const std::filesystem::path& filename) {
std::ofstream file(filename, std::ios::out | std::ios::binary);
if (!file.is_open()) {
return false;