mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix build
This commit is contained in:
@@ -201,17 +201,17 @@ int main(int argc, char * argv[])
|
|||||||
preinitDLL(::console, false);
|
preinitDLL(::console, false);
|
||||||
|
|
||||||
Settings session = settings.write["session"];
|
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, "/"));
|
Settings s = settings.write(vstd::split(key, "/"));
|
||||||
if(::vm.count(arg))
|
if(vm.count(arg))
|
||||||
s->Bool() = true;
|
s->Bool() = true;
|
||||||
else if(s->isNull())
|
else if(s->isNull())
|
||||||
s->Bool() = false;
|
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, "/"));
|
Settings s = settings.write(vstd::split(key, "/"));
|
||||||
if(::vm.count(arg))
|
if(vm.count(arg))
|
||||||
s->Integer() = ::vm[arg].as<si64>();
|
s->Integer() = vm[arg].as<si64>();
|
||||||
else if(s->isNull())
|
else if(s->isNull())
|
||||||
s->Integer() = defaultValue;
|
s->Integer() = defaultValue;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user