fix compile error

This commit is contained in:
Anonymous275
2022-08-22 12:15:25 +03:00
parent 2fd85246c2
commit d5529fcf5b

View File

@@ -3,7 +3,6 @@
/// Copyright (c) 2021-present Anonymous275 read the LICENSE file for more info.
///
// clang-format off
#include <tomlplusplus/toml.hpp>
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/dc.h>
@@ -16,6 +15,7 @@
#include <wx/wx.h>
#include <wx/wxhtml.h.>
#include <wx/filepicker.h>
#include <tomlplusplus/toml.hpp>
#include <comutil.h>
#include <ShlObj.h>
#include <fstream>
@@ -199,7 +199,7 @@ void MySettingsFrame::UpdateCacheDirectory(const std::string& path) {
template<typename ValueType>
void UpdateConfig(const std::string& key, ValueType&& value) {
if (fs::exists(UIData::ConfigPath)) {
toml::table config = toml::parse_file(UIData::ConfigPath).table();
toml::parse_result config = toml::parse_file(UIData::ConfigPath);
config.insert_or_assign(key, value);
std::ofstream tml(UIData::ConfigPath);