mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 15:26:59 +00:00
update to toml11 v3.4.1
This commit is contained in:
parent
4a062e5aa0
commit
a147edd31a
@ -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")
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user