1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-09 01:06:07 +02:00

Fix error: 'auto' not allowed in non-static struct member

This commit is contained in:
Alexander Wilms
2024-01-17 14:49:28 +00:00
parent 57c51b62fd
commit 7a1cee1a60
3 changed files with 6 additions and 6 deletions

View File

@ -1204,8 +1204,8 @@ CSelector JsonUtils::parseSelector(const JsonNode & ability)
ret = ret.And(Selector::subtype()(subtype));
}
value = &ability["sourceType"];
auto src = std::nullopt; //Fixes for GCC false maybe-uninitialized
auto id = std::nullopt;
std::optional<BonusSource> src = std::nullopt; //Fixes for GCC false maybe-uninitialized
std::optional<BonusSourceID> id = std::nullopt;
if(value->isString())
{
auto it = bonusSourceMap.find(value->String());