Added lots of security using asserts.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#ifndef CREATURELIB_BATTLEPARTY_HPP
|
||||
#define CREATURELIB_BATTLEPARTY_HPP
|
||||
|
||||
#include <Arbutils/Assert.hpp>
|
||||
#include "CreatureIndex.hpp"
|
||||
#include "CreatureParty.hpp"
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
class BattleParty {
|
||||
CreatureParty* _party;
|
||||
@@ -11,7 +11,9 @@ namespace CreatureLib::Battling {
|
||||
|
||||
public:
|
||||
BattleParty(CreatureParty* party, std::vector<CreatureIndex> responsibleIndices)
|
||||
: _party(party), _responsibleIndices(responsibleIndices) {}
|
||||
: _party(party), _responsibleIndices(responsibleIndices) {
|
||||
AssertNotNull(_party)
|
||||
}
|
||||
|
||||
inline CreatureParty* GetParty() const { return _party; }
|
||||
inline const std::vector<CreatureIndex>& GetResponsibleIndices() const { return _responsibleIndices; }
|
||||
|
||||
Reference in New Issue
Block a user