Remove fmt::format and replace with std::format

This commit is contained in:
Alexander Bock
2024-03-24 20:19:14 +01:00
parent 9878bfc8f7
commit 3ba346a227
246 changed files with 1343 additions and 1300 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ void RawVolumeWriter<VoxelType>::write(const RawVolume<VoxelType>& volume) {
std::ofstream file(_path, std::ios::binary);
if (!file.good()) {
throw ghoul::RuntimeError(fmt::format("Could not create file '{}'", _path));
throw ghoul::RuntimeError(std::format("Could not create file '{}'", _path));
}
file.write(buffer, length);
@@ -232,7 +232,7 @@ void RenderableTimeVaryingVolume::initializeGL() {
std::filesystem::path sequenceDir = absPath(_sourceDirectory);
if (!std::filesystem::is_directory(sequenceDir)) {
LERROR(fmt::format("Could not load sequence directory '{}'", sequenceDir));
LERROR(std::format("Could not load sequence directory '{}'", sequenceDir));
return;
}
@@ -246,7 +246,7 @@ void RenderableTimeVaryingVolume::initializeGL() {
// TODO: defer loading of data to later (separate thread or at least not when loading)
for (std::pair<const double, Timestep>& p : _volumeTimesteps) {
Timestep& t = p.second;
const std::string path = fmt::format(
const std::string path = std::format(
"{}/{}.rawvolume", _sourceDirectory.value(), t.baseName
);
RawVolumeReader<float> reader(path, t.metadata.dimensions);
@@ -88,7 +88,7 @@ GenerateRawVolumeTask::GenerateRawVolumeTask(const ghoul::Dictionary& dictionary
}
std::string GenerateRawVolumeTask::description() {
return fmt::format(
return std::format(
"Generate a raw volume with dimenstions: ({}, {}, {}). For each cell, set the "
"value by evaluating the lua function: `{}`, with three arguments (x, y, z) "
"ranging from ({}, {}, {}) to ({}, {}, {}). Write raw volume data into '{}' and "