Fix for compilation issue when using NO_ASSERT.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-22 12:54:11 +02:00
parent 331767789c
commit ddbf4c23b8
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
3 changed files with 4 additions and 5 deletions

View File

@ -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<BattleSide*>(numberOfSides);
_sides = List<BattleSide*>(numberOfSides);
for (size_t i = 0; i < numberOfSides; i++) {
_sides[i] = new BattleSide(i, this, creaturesPerSide);
}

View File

@ -1,6 +1,6 @@
#include "LearnedAttack.hpp"
#include <Arbutils/Assert.hpp>
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)

View File

@ -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;