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
@@ -135,7 +135,7 @@ RenderablePoints::RenderablePoints(const ghoul::Dictionary& dictionary)
addProperty(_opacity);
registerUpdateRenderBinFromOpacity();
_speckFile = absPath(p.file).string();
_speckFile = absPath(p.file);
if (p.unit.has_value()) {
switch (*p.unit) {
@@ -185,7 +185,7 @@ RenderablePoints::RenderablePoints(const ghoul::Dictionary& dictionary)
}
if (p.colorMap.has_value()) {
_colorMapFile = absPath(*p.colorMap).string();
_colorMapFile = absPath(*p.colorMap);
_hasColorMapFile = true;
}
@@ -347,9 +347,9 @@ void RenderablePoints::update(const UpdateData&) {
absPath(_spriteTexturePath).string()
);
if (_spriteTexture) {
LDEBUG(fmt::format(
"Loaded texture from '{}'",absPath(_spriteTexturePath)
));
LDEBUG(
fmt::format("Loaded texture from {}", absPath(_spriteTexturePath))
);
_spriteTexture->uploadTexture();
}
_spriteTexture->setFilter(
@@ -369,7 +369,7 @@ void RenderablePoints::readColorMapFile() {
std::ifstream file(_colorMapFile);
if (!file.good()) {
throw ghoul::RuntimeError(fmt::format(
"Failed to open Color Map file '{}'", _colorMapFile
"Failed to open Color Map file {}", _colorMapFile
));
}
@@ -396,7 +396,7 @@ void RenderablePoints::readColorMapFile() {
}
else if (file.eof()) {
throw ghoul::RuntimeError(fmt::format(
"Failed to load colors from Color Map file '{}'", _colorMapFile
"Failed to load colors from Color Map file {}", _colorMapFile
));
}
}