mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
lib now uses shared_ptr for entities. Removed manual memory management.
This commit is contained in:
@@ -261,7 +261,7 @@ void CRecruitmentWindow::availableCreaturesChanged()
|
||||
|
||||
//create new cards
|
||||
for(auto & creature : boost::adaptors::reverse(dwelling->creatures[i].second))
|
||||
cards.push_back(std::make_shared<CCreatureCard>(this, CGI->creh->objects[creature], amount));
|
||||
cards.push_back(std::make_shared<CCreatureCard>(this, creature.toCreature(), amount));
|
||||
}
|
||||
|
||||
const int creatureWidth = 102;
|
||||
|
||||
Reference in New Issue
Block a user