diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index c98f023714..f7991b096c 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit c98f023714d901bc0f94462af1955ad2b014818f +Subproject commit f7991b096c79faaaa4c64837c3d1fa0f3334b466 diff --git a/ext/ghoul b/ext/ghoul index 0dacfd1505..5f02615dab 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 0dacfd150584ebbe05cf4fdd94eb159abcce76cc +Subproject commit 5f02615dabf23e471a54f2108912e6126e367c9a diff --git a/modules/base/dashboard/dashboarditemdate.cpp b/modules/base/dashboard/dashboarditemdate.cpp index d9eed5985d..fa02763c3f 100644 --- a/modules/base/dashboard/dashboarditemdate.cpp +++ b/modules/base/dashboard/dashboarditemdate.cpp @@ -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 diff --git a/modules/base/dashboard/dashboarditemdistance.cpp b/modules/base/dashboard/dashboarditemdistance.cpp index 8f738e1b24..6074ace28f 100644 --- a/modules/base/dashboard/dashboarditemdistance.cpp +++ b/modules/base/dashboard/dashboarditemdistance.cpp @@ -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 ); diff --git a/modules/base/dashboard/dashboarditempropertyvalue.cpp b/modules/base/dashboard/dashboarditempropertyvalue.cpp index ac28a1b5c9..318fafacda 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.cpp +++ b/modules/base/dashboard/dashboarditempropertyvalue.cpp @@ -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(); } } diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.cpp b/modules/base/dashboard/dashboarditemsimulationincrement.cpp index 0b6ffcb951..1d5b660897 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.cpp +++ b/modules/base/dashboard/dashboarditemsimulationincrement.cpp @@ -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 ) ); diff --git a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp index de50940813..83c9f08995 100644 --- a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp +++ b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp @@ -364,8 +364,8 @@ void prepareStateAndKameleonForExtras(ccmc::Kameleon* kameleon, } if (!success) { LWARNING(fmt::format( - "Failed to load at least one of the magnitude variables: {}, {}, {} " - "& {}. Removing ability to store corresponding magnitude", + "Failed to load at least one of the magnitude variables: {}, {}, {}. " + "Removing ability to store corresponding magnitude", s1, s2, s3 )); extraMagVars.erase( diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.cpp b/modules/globebrowsing/src/dashboarditemglobelocation.cpp index 55a1e34316..a017d51f3d 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.cpp +++ b/modules/globebrowsing/src/dashboarditemglobelocation.cpp @@ -217,7 +217,7 @@ void DashboardItemGlobeLocation::render(glm::vec2& penPosition) { { end = fmt::format_to( _buffer.data(), - _formatString, lat, lon, dist.first, dist.second + fmt::runtime(_formatString), lat, lon, dist.first, dist.second ); break; } @@ -244,7 +244,7 @@ void DashboardItemGlobeLocation::render(glm::vec2& penPosition) { end = fmt::format_to( _buffer.data(), - _formatString, + fmt::runtime(_formatString), latDeg, latMin, latSec, isNorth ? "N" : "S", lonDeg, lonMin, lonSec, isEast ? "E" : "W", dist.first, dist.second diff --git a/modules/skybrowser/src/wwtdatahandler.cpp b/modules/skybrowser/src/wwtdatahandler.cpp index f8a1b34b27..f45e68b3d6 100644 --- a/modules/skybrowser/src/wwtdatahandler.cpp +++ b/modules/skybrowser/src/wwtdatahandler.cpp @@ -155,7 +155,7 @@ void parseWtmlsFromDisc(std::vector& xmls, { for (const auto& entry : std::filesystem::directory_iterator(directory)) { tinyxml2::XMLDocument* document = new tinyxml2::XMLDocument(); - std::string path = entry.path().u8string(); + std::string path = entry.path().string(); tinyxml2::XMLError successCode = document->LoadFile(path.c_str()); if (successCode == tinyxml2::XMLError::XML_SUCCESS) { diff --git a/modules/space/rendering/renderablesmallbody.cpp b/modules/space/rendering/renderablesmallbody.cpp index 61e0626a6b..caf3396516 100644 --- a/modules/space/rendering/renderablesmallbody.cpp +++ b/modules/space/rendering/renderablesmallbody.cpp @@ -248,16 +248,18 @@ void RenderableSmallBody::readDataFile(const std::string& filename) { sequentialLineErrors = 0; } catch (std::invalid_argument&) { - const char* errMsg = "Unable to convert field {} to double value "\ - "(invalid_argument exception). Ignoring line {}/{} of {}."; + constexpr std::string_view errMsg = "Unable to convert field {} to " + "double value (invalid_argument exception). Ignoring line {}/{} " + "of {}."; LINFO(fmt::format( errMsg, fieldCount, csvLine + 1, numberOfLines, filename )); } catch (std::out_of_range&) { - const char* errMsg = "Unable to convert field {} to double value "\ - "(out_of_range exception). Ignoring line {}/{} of {}."; + constexpr std::string_view errMsg = "Unable to convert field {} to " + "double value (out_of_range exception). Ignoring line {}/{} of " + "{}."; LINFO(fmt::format( errMsg, fieldCount, csvLine + 1, numberOfLines, filename diff --git a/src/engine/configuration.cpp b/src/engine/configuration.cpp index a1acf617cc..2bff817f1a 100644 --- a/src/engine/configuration.cpp +++ b/src/engine/configuration.cpp @@ -309,6 +309,7 @@ void parseLuaState(Configuration& configuration) { lua_getglobal(s, "sgctconfiginitializeString"); c.sgctConfigNameInitialized = ghoul::lua::value( s, + 1, ghoul::lua::PopValue::Yes ); diff --git a/src/events/event.cpp b/src/events/event.cpp index 16c1d84432..3be53f7c3f 100644 --- a/src/events/event.cpp +++ b/src/events/event.cpp @@ -538,8 +538,7 @@ void logAllEvents(const Event* e) { log(i, *static_cast(e)); break; default: - LINFO(fmt::format("[{}]: Unknown {}", typeid(e).name())); - break; + throw ghoul::MissingCaseException(); } i++; diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index d3020216a9..fd7f0fde1e 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -23,7 +23,7 @@ ########################################################################################## function (set_openspace_compile_settings target) - target_compile_features(${target} PRIVATE cxx_std_17) + target_compile_features(${target} PRIVATE cxx_std_20) set(MSVC_WARNINGS "/MP" # Multi-threading support diff --git a/support/coding/codegen b/support/coding/codegen index ae8d21e9aa..8ee86de09a 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit ae8d21e9aa2903c6b13060239ffbb675e92e6a51 +Subproject commit 8ee86de09a2c902448d37d1a2828130839e2582d