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
@@ -185,7 +185,7 @@ std::shared_ptr<TableData<T>> FitsFileReader::readTable(const std::filesystem::p
}
}
catch (FitsException& e) {
LERROR(fmt::format(
LERROR(std::format(
"Could not read FITS table from file '{}'. Make sure it's not an image file",
e.message()
));
@@ -248,7 +248,7 @@ std::vector<float> FitsFileReader::readFitsFile(std::filesystem::path filePath,
);
if (!table) {
throw ghoul::RuntimeError(fmt::format("Failed to open Fits file '{}'", filePath));
throw ghoul::RuntimeError(std::format("Failed to open Fits file '{}'", filePath));
}
int nStars = table->readRows - firstRow + 1;
@@ -385,7 +385,7 @@ std::vector<float> FitsFileReader::readFitsFile(std::filesystem::path filePath,
auto table = readTable<float>(filePath, allColumnNames, firstRow, lastRow);
if (!table) {
throw ghoul::RuntimeError(fmt::format("Failed to open Fits file '{}'", filePath));
throw ghoul::RuntimeError(std::format("Failed to open Fits file '{}'", filePath));
}
int nStars = table->readRows - firstRow + 1;
@@ -517,8 +517,8 @@ std::vector<float> FitsFileReader::readFitsFile(std::filesystem::path filePath,
fullData.insert(fullData.end(), values.begin(), values.end());
}*/
LINFO(fmt::format("{} out of {} read stars were null arrays", nNullArr, nStars));
LINFO(fmt::format("Multiplier: {}", multiplier));
LINFO(std::format("{} out of {} read stars were null arrays", nNullArr, nStars));
LINFO(std::format("Multiplier: {}", multiplier));
return fullData;
}
@@ -531,7 +531,7 @@ std::vector<float> FitsFileReader::readSpeckFile(const std::filesystem::path& fi
std::ifstream fileStream(filePath);
if (!fileStream.good()) {
LERROR(fmt::format("Failed to open Speck file '{}'", filePath));
LERROR(std::format("Failed to open Speck file '{}'", filePath));
return fullData;
}
@@ -649,7 +649,7 @@ std::vector<float> FitsFileReader::readSpeckFile(const std::filesystem::path& fi
} while (!fileStream.eof());
LINFO(fmt::format("{} out of {} read stars were null arrays", nNullArr, nStars));
LINFO(std::format("{} out of {} read stars were null arrays", nNullArr, nStars));
return fullData;
}