From a147edd31a4d2ffa6846fc9183d6d417a2b98771 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 27 Jul 2024 20:25:45 +0200 Subject: [PATCH] update to toml11 v3.4.1 --- cmake/Git.cmake | 2 +- src/TConfig.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/Git.cmake b/cmake/Git.cmake index abeffc6..d88f5a0 100644 --- a/cmake/Git.cmake +++ b/cmake/Git.cmake @@ -2,7 +2,7 @@ find_package(Git) if(${PROJECT_NAME}_CHECKOUT_GIT_SUBMODULES) if(Git_FOUND) 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} RESULT_VARIABLE GIT_SUBMOD_RESULT) if(NOT GIT_SUBMOD_RESULT EQUAL "0") diff --git a/src/TConfig.cpp b/src/TConfig.cpp index 95044a7..29eeafe 100644 --- a/src/TConfig.cpp +++ b/src/TConfig.cpp @@ -158,7 +158,7 @@ void TConfig::FlushToFile() { Ss << "# This is the BeamMP-Server config file.\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" - << data; + << toml::format(data); auto File = std::fopen(mConfigFileName.c_str(), "w+"); if (!File) { beammp_error("Failed to create/write to config file: " + GetPlatformAgnosticErrorString()); @@ -240,7 +240,7 @@ void TConfig::ParseFromFile(std::string_view name) { try { toml::value data {}; if (!mDisableConfig) { - data = toml::parse(name.data()); + data = toml::parse(name.data()); } // GENERAL