diff --git a/source/client_version.cpp b/source/client_version.cpp index 0e828bf8..8925852b 100644 --- a/source/client_version.cpp +++ b/source/client_version.cpp @@ -133,10 +133,9 @@ void ClientVersion::loadVersions() version->setClientPath(wxstr(ver_obj.at("path").get())); } } - catch (std::runtime_error&) + catch ([[maybe_unused]]const json::exception& e) { // pass - ; } } @@ -329,18 +328,23 @@ void ClientVersion::loadVersionExtensions(pugi::xml_node versionNode) void ClientVersion::saveVersions() { - json vers_obj; + try { + json vers_obj; + + for(auto& [id, version] : client_versions) { + json ver_obj; + ver_obj["id"] = version->getName(); + ver_obj["path"] = version->getClientPath().GetFullPath().ToStdString(); + vers_obj.push_back(ver_obj); + } - for(auto& [id, version] : client_versions) { - json ver_obj; - ver_obj["id"] = version->getName(); - ver_obj["path"] = version->getClientPath().GetFullPath().ToStdString(); - vers_obj.push_back(ver_obj); + std::ostringstream out; + out << vers_obj; + g_settings.setString(Config::ASSETS_DATA_DIRS, out.str()); + } + catch ([[maybe_unused]]const json::exception& e) { + // pass } - - std::ostringstream out; - out << vers_obj; - g_settings.setString(Config::ASSETS_DATA_DIRS, out.str()); } // Client version class diff --git a/vcproj/Project/RME.vcxproj b/vcproj/Project/RME.vcxproj index 2c9a145b..c3ea811d 100644 --- a/vcproj/Project/RME.vcxproj +++ b/vcproj/Project/RME.vcxproj @@ -112,6 +112,7 @@ ProgramDatabase true main.h + stdcpp20 comctl32.lib;Rpcrt4.lib;WS2_32.lib;%(AdditionalDependencies) @@ -122,7 +123,7 @@ true Windows MachineX86 - wxscintillad.lib + wxscintillad.lib;freeglutd.lib @@ -138,6 +139,7 @@ true main.h /bigobj %(AdditionalOptions) + stdcpp20 comctl32.lib;Rpcrt4.lib;WS2_32.lib;%(AdditionalDependencies) @@ -147,7 +149,7 @@ $(TargetName).map true Windows - wxscintillad.lib + wxscintillad.lib;freeglutd.lib