1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix build

This commit is contained in:
Ivan Savenko
2024-02-12 15:08:46 +02:00
parent 4c70abbeb5
commit 62148e1506

View File

@@ -201,17 +201,17 @@ int main(int argc, char * argv[])
preinitDLL(::console, false);
Settings session = settings.write["session"];
auto setSettingBool = [](std::string key, std::string arg) {
auto setSettingBool = [&](std::string key, std::string arg) {
Settings s = settings.write(vstd::split(key, "/"));
if(::vm.count(arg))
if(vm.count(arg))
s->Bool() = true;
else if(s->isNull())
s->Bool() = false;
};
auto setSettingInteger = [](std::string key, std::string arg, si64 defaultValue) {
auto setSettingInteger = [&](std::string key, std::string arg, si64 defaultValue) {
Settings s = settings.write(vstd::split(key, "/"));
if(::vm.count(arg))
s->Integer() = ::vm[arg].as<si64>();
if(vm.count(arg))
s->Integer() = vm[arg].as<si64>();
else if(s->isNull())
s->Integer() = defaultValue;
};