update to toml11 v3.4.1

This commit is contained in:
Lion Kortlepel 2024-07-27 20:25:45 +02:00
parent 4a062e5aa0
commit a147edd31a
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ find_package(Git)
if(${PROJECT_NAME}_CHECKOUT_GIT_SUBMODULES) if(${PROJECT_NAME}_CHECKOUT_GIT_SUBMODULES)
if(Git_FOUND) if(Git_FOUND)
message(STATUS "Git found, submodule update and init") message(STATUS "Git found, submodule update and init")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT) RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0") if(NOT GIT_SUBMOD_RESULT EQUAL "0")

View File

@ -158,7 +158,7 @@ void TConfig::FlushToFile() {
Ss << "# This is the BeamMP-Server config file.\n" Ss << "# This is the BeamMP-Server config file.\n"
"# Help & Documentation: `https://docs.beammp.com/server/server-maintenance/`\n" "# Help & Documentation: `https://docs.beammp.com/server/server-maintenance/`\n"
"# IMPORTANT: Fill in the AuthKey with the key you got from `https://keymaster.beammp.com/` on the left under \"Keys\"\n" "# IMPORTANT: Fill in the AuthKey with the key you got from `https://keymaster.beammp.com/` on the left under \"Keys\"\n"
<< data; << toml::format(data);
auto File = std::fopen(mConfigFileName.c_str(), "w+"); auto File = std::fopen(mConfigFileName.c_str(), "w+");
if (!File) { if (!File) {
beammp_error("Failed to create/write to config file: " + GetPlatformAgnosticErrorString()); beammp_error("Failed to create/write to config file: " + GetPlatformAgnosticErrorString());
@ -240,7 +240,7 @@ void TConfig::ParseFromFile(std::string_view name) {
try { try {
toml::value data {}; toml::value data {};
if (!mDisableConfig) { if (!mDisableConfig) {
data = toml::parse<toml::preserve_comments>(name.data()); data = toml::parse(name.data());
} }
// GENERAL // GENERAL