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
+7 -3
View File
@@ -97,10 +97,11 @@ void DashboardItemDate::render(glm::vec2& penPosition) {
RenderFont(
*_font,
penPosition,
fmt::format(fmt::runtime(_formatString.value()), time)
// @CPP26(abock): This can be replaced with std::runtime_format
std::vformat(_formatString.value(), std::make_format_args(time))
);
}
catch (const fmt::format_error&) {
catch (const std::format_error&) {
LERRORC("DashboardItemDate", "Illegal format string");
}
penPosition.y -= _font->height();
@@ -110,7 +111,10 @@ glm::vec2 DashboardItemDate::size() const {
ZoneScoped;
std::string_view time = global::timeManager->time().UTC();
return _font->boundingBox(fmt::format(fmt::runtime(_formatString.value()), time));
// @CPP26(abock): This can be replaced with std::runtime_format
return _font->boundingBox(
std::vformat(_formatString.value(), std::make_format_args(time))
);
}
} // namespace openspace