diff --git a/src/Battling/Models/Battle.hpp b/src/Battling/Models/Battle.hpp index 65a82d7..d939096 100644 --- a/src/Battling/Models/Battle.hpp +++ b/src/Battling/Models/Battle.hpp @@ -39,10 +39,9 @@ namespace CreatureLib::Battling { : _library(library), _parties(std::move(parties)), _canFlee(canFlee), _numberOfSides(numberOfSides), _creaturesPerSide(creaturesPerSide) { AssertNotNull(_library) - for (auto p : parties) - AssertNotNull(p) + AssertAllNotNull(parties) - _sides = List(numberOfSides); + _sides = List(numberOfSides); for (size_t i = 0; i < numberOfSides; i++) { _sides[i] = new BattleSide(i, this, creaturesPerSide); } diff --git a/src/Battling/Models/LearnedAttack.cpp b/src/Battling/Models/LearnedAttack.cpp index 1be463f..a012027 100644 --- a/src/Battling/Models/LearnedAttack.cpp +++ b/src/Battling/Models/LearnedAttack.cpp @@ -1,6 +1,6 @@ #include "LearnedAttack.hpp" #include -CreatureLib::Battling::LearnedAttack::LearnedAttack(CreatureLib::Library::AttackData* attack, uint8_t maxUses, +CreatureLib::Battling::LearnedAttack::LearnedAttack(const CreatureLib::Library::AttackData* attack, uint8_t maxUses, AttackLearnMethod learnMethod) : _attack(attack), _maxUses(maxUses), _remainingUses(maxUses), _learnMethod(learnMethod) { AssertNotNull(_attack) diff --git a/src/Battling/Models/LearnedAttack.hpp b/src/Battling/Models/LearnedAttack.hpp index 1e6475a..a035b04 100644 --- a/src/Battling/Models/LearnedAttack.hpp +++ b/src/Battling/Models/LearnedAttack.hpp @@ -12,7 +12,7 @@ namespace CreatureLib::Battling { AttackLearnMethod _learnMethod; public: - LearnedAttack(Library::AttackData* attack, uint8_t maxUses, AttackLearnMethod learnMethod); + LearnedAttack(const Library::AttackData* attack, uint8_t maxUses, AttackLearnMethod learnMethod); LearnedAttack(const Library::AttackData* attack, AttackLearnMethod learnMethod); virtual ~LearnedAttack() = default;