mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 12:30:00 -05:00
Remove fmt::format and replace with std::format
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user