From a568a9b3fbf71caa2f948e9d1560498bfa995489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Wed, 17 Jan 2024 07:26:51 +0100 Subject: [PATCH] Fix lambda capture --- lib/rmg/modificators/TreasurePlacer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rmg/modificators/TreasurePlacer.cpp b/lib/rmg/modificators/TreasurePlacer.cpp index a40a3faa5..504fe9a78 100644 --- a/lib/rmg/modificators/TreasurePlacer.cpp +++ b/lib/rmg/modificators/TreasurePlacer.cpp @@ -488,7 +488,7 @@ void TreasurePlacer::addAllPossibleObjects() int randomAppearance = chooseRandomAppearance(zone.getRand(), Obj::SEER_HUT, zone.getTerrainType()); // FIXME: Remove duplicated code for gold, exp and creaure reward - oi.generateObject = [creature, creaturesAmount, randomAppearance, qap, &oi, setRandomArtifact]() -> CGObjectInstance * + oi.generateObject = [creature, creaturesAmount, randomAppearance, &oi, setRandomArtifact]() -> CGObjectInstance * { auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance); auto * obj = dynamic_cast(factory->create()); @@ -532,7 +532,7 @@ void TreasurePlacer::addAllPossibleObjects() oi.probability = 10; oi.maxPerZone = 1; - oi.generateObject = [i, randomAppearance, this, qap, &oi, setRandomArtifact]() -> CGObjectInstance * + oi.generateObject = [i, randomAppearance, this, &oi, setRandomArtifact]() -> CGObjectInstance * { auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance); auto * obj = dynamic_cast(factory->create()); @@ -550,7 +550,7 @@ void TreasurePlacer::addAllPossibleObjects() if(!oi.templates.empty()) possibleSeerHuts.push_back(oi); - oi.generateObject = [i, randomAppearance, this, qap, &oi, setRandomArtifact]() -> CGObjectInstance * + oi.generateObject = [i, randomAppearance, this, &oi, setRandomArtifact]() -> CGObjectInstance * { auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance); auto * obj = dynamic_cast(factory->create());