mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Update to C++20
This commit is contained in:
@@ -91,7 +91,11 @@ void DashboardItemDate::render(glm::vec2& penPosition) {
|
||||
);
|
||||
|
||||
try {
|
||||
RenderFont(*_font, penPosition, fmt::format(_formatString.value().c_str(), time));
|
||||
RenderFont(
|
||||
*_font,
|
||||
penPosition,
|
||||
fmt::format(fmt::runtime(_formatString.value()), time)
|
||||
);
|
||||
}
|
||||
catch (const fmt::format_error&) {
|
||||
LERRORC("DashboardItemDate", "Illegal format string");
|
||||
@@ -103,7 +107,7 @@ glm::vec2 DashboardItemDate::size() const {
|
||||
ZoneScoped
|
||||
|
||||
std::string_view time = global::timeManager->time().UTC();
|
||||
return _font->boundingBox(fmt::format(_formatString.value().c_str(), time));
|
||||
return _font->boundingBox(fmt::format(fmt::runtime(_formatString.value()), time));
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -358,7 +358,7 @@ void DashboardItemDistance::render(glm::vec2& penPosition) {
|
||||
try {
|
||||
char* end = fmt::format_to(
|
||||
_buffer.data(),
|
||||
_formatString.value().c_str(),
|
||||
fmt::runtime(_formatString.value()),
|
||||
sourceInfo.second, destinationInfo.second, dist.first, dist.second
|
||||
);
|
||||
|
||||
|
||||
@@ -96,7 +96,11 @@ void DashboardItemPropertyValue::render(glm::vec2& penPosition) {
|
||||
std::string value;
|
||||
_property->getStringValue(value);
|
||||
|
||||
RenderFont(*_font, penPosition, fmt::format(_displayString.value(), value));
|
||||
RenderFont(
|
||||
*_font,
|
||||
penPosition,
|
||||
fmt::format(fmt::runtime(_displayString.value()), value)
|
||||
);
|
||||
penPosition.y -= _font->height();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ void DashboardItemSimulationIncrement::render(glm::vec2& penPosition) {
|
||||
*_font,
|
||||
penPosition,
|
||||
fmt::format(
|
||||
_transitionFormat.value().c_str(),
|
||||
fmt::runtime(_transitionFormat.value()),
|
||||
targetDeltaTime.first, targetDeltaTime.second,
|
||||
pauseText,
|
||||
currentDeltaTime.first, currentDeltaTime.second
|
||||
@@ -194,7 +194,7 @@ void DashboardItemSimulationIncrement::render(glm::vec2& penPosition) {
|
||||
*_font,
|
||||
penPosition,
|
||||
fmt::format(
|
||||
_regularFormat.value().c_str(),
|
||||
fmt::runtime(_regularFormat.value()),
|
||||
targetDeltaTime.first, targetDeltaTime.second, pauseText
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user