mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Stacks of armed instance are now unique_ptr
This commit is contained in:
@ -102,8 +102,8 @@ void CGMine::initObj(vstd::RNG & rand)
|
||||
{
|
||||
//set guardians
|
||||
int howManyTroglodytes = rand.nextInt(100, 199);
|
||||
auto * troglodytes = new CStackInstance(CreatureID::TROGLODYTES, howManyTroglodytes);
|
||||
putStack(SlotID(0), troglodytes);
|
||||
auto troglodytes = std::make_unique<CStackInstance>(CreatureID::TROGLODYTES, howManyTroglodytes);
|
||||
putStack(SlotID(0), std::move(troglodytes));
|
||||
|
||||
assert(!abandonedMineResources.empty());
|
||||
if (!abandonedMineResources.empty())
|
||||
|
Reference in New Issue
Block a user