When creating a CreatureParty with a size, don't just reserve the space, but append nullptr as well.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
8ba564d4b7
commit
a4bb8864a0
|
@ -9,7 +9,11 @@ namespace CreatureLib::Battling {
|
||||||
ArbUt::UniquePtrList<Creature> _party;
|
ArbUt::UniquePtrList<Creature> _party;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CreatureParty(size_t size) noexcept : _party(size) {}
|
CreatureParty(size_t size) noexcept : _party(size) {
|
||||||
|
for (size_t i = 0; i < size; i++) {
|
||||||
|
_party.Append(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
CreatureParty(ArbUt::List<Creature*> party) noexcept : _party(party.GetStdList()) {}
|
CreatureParty(ArbUt::List<Creature*> party) noexcept : _party(party.GetStdList()) {}
|
||||||
CreatureParty(std::initializer_list<Creature*> party) noexcept : _party(party) {}
|
CreatureParty(std::initializer_list<Creature*> party) noexcept : _party(party) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue