1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

vcmi: fix abandoned mine resource loading

It was overshadowed by local variable
This commit is contained in:
Konstantin P 2023-04-25 13:38:57 +03:00
parent 608c30c3d3
commit 54e4db3819

View File

@ -768,7 +768,6 @@ void CGMine::serializeJsonOptions(JsonSerializeFormat & handler)
{
auto guard = handler.enterArray("possibleResources");
const JsonNode & node = handler.getCurrent();
std::set<int> abandonedMineResources;
auto names = node.convertTo<std::vector<std::string>>();
@ -778,7 +777,7 @@ void CGMine::serializeJsonOptions(JsonSerializeFormat & handler)
if(raw_res < 0)
logGlobal->error("Invalid resource name: %s", s);
else
abandonedMineResources.insert(raw_res);
abandonedMineResources.emplace(raw_res);
}
}
}