Make most of the battle library use unique_ptr.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-26 15:11:04 +02:00
parent e46117ea06
commit 16b67b0d54
6 changed files with 27 additions and 25 deletions

View File

@@ -129,7 +129,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, Creature* targe
auto attackData = attack->GetAttack()->GetAttack();
auto library = user->GetBattle()->GetLibrary();
AssertNotNull(library)
auto dmgLibrary = library->GetDamageLibrary();
auto& dmgLibrary = library->GetDamageLibrary();
auto hitIterator = attack->GetTargetIteratorBegin(target);
for (uint8_t hitIndex = 0; hitIndex < numberOfHits; hitIndex++) {
if (user->IsFainted()) {