From bddadff009ebc4ca029eb86401caa6f06ccc6a2d Mon Sep 17 00:00:00 2001 From: shevernitskiy Date: Wed, 14 Feb 2024 10:01:48 +0300 Subject: [PATCH] fix --- src/hook/config.h | 8 ++++---- xmake.lua | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hook/config.h b/src/hook/config.h index 8c62951..eca9c04 100644 --- a/src/hook/config.h +++ b/src/hook/config.h @@ -24,11 +24,11 @@ namespace Config { return nt_header->FileHeader.TimeDateStamp; } - inline toml::v3::table GetOffsetsFile(time_t target_checksum) { + inline toml::v3::ex::parse_result GetOffsetsFile(time_t target_checksum) { for (const auto& filepath : std::filesystem::recursive_directory_iterator(PATH_OFFSETS)) { - auto file = toml::parse_file(filepath.path().c_str()); + auto file = toml::v3::parse_file(filepath.path().c_str()); if (target_checksum == file["metadata"]["checksum"].value_or(0)) { - return *file.as_table(); + return file; } } @@ -37,7 +37,7 @@ namespace Config { MessageBoxA(nullptr, message.c_str(), "dfint hook error", MB_ICONERROR); exit(2); - return toml::v3::table{}; + return toml::v3::ex::parse_result{}; } inline auto config = toml::parse_file("./dfint_data/dfint_config.toml"); diff --git a/xmake.lua b/xmake.lua index d8ad9bb..450a4de 100644 --- a/xmake.lua +++ b/xmake.lua @@ -20,7 +20,7 @@ add_includedirs("deps/include") --3rd party remote libs add_requires("spdlog") add_requires("vcpkg::detours") -add_requires("toml++") +add_requires("toml++ 3.3.0") option("hook_version") set_default("not-defined")