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,8 +39,7 @@ namespace CreatureLib::Battling {
: _library(library), _parties(std::move(parties)), _canFlee(canFlee), _numberOfSides(numberOfSides), : _library(library), _parties(std::move(parties)), _canFlee(canFlee), _numberOfSides(numberOfSides),
_creaturesPerSide(creaturesPerSide) { _creaturesPerSide(creaturesPerSide) {
AssertNotNull(_library) AssertNotNull(_library)
for (auto p : parties) AssertAllNotNull(parties)
AssertNotNull(p)
_sides = List<BattleSide*>(numberOfSides); _sides = List<BattleSide*>(numberOfSides);
for (size_t i = 0; i < numberOfSides; i++) { for (size_t i = 0; i < numberOfSides; i++) {

View File

@ -1,6 +1,6 @@
#include "LearnedAttack.hpp" #include "LearnedAttack.hpp"
#include <Arbutils/Assert.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) AttackLearnMethod learnMethod)
: _attack(attack), _maxUses(maxUses), _remainingUses(maxUses), _learnMethod(learnMethod) { : _attack(attack), _maxUses(maxUses), _remainingUses(maxUses), _learnMethod(learnMethod) {
AssertNotNull(_attack) AssertNotNull(_attack)

View File

@ -12,7 +12,7 @@ namespace CreatureLib::Battling {
AttackLearnMethod _learnMethod; AttackLearnMethod _learnMethod;
public: 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); LearnedAttack(const Library::AttackData* attack, AttackLearnMethod learnMethod);
virtual ~LearnedAttack() = default; virtual ~LearnedAttack() = default;