Smart pointers for most library and battle classes.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-06-02 20:37:21 +02:00
parent 1d1dc877a0
commit 2d3a2fc63b
22 changed files with 91 additions and 89 deletions

View File

@@ -12,8 +12,8 @@ namespace PkmnLib::Battling {
PokemonParty(std::initializer_list<CreatureLib::Battling::Creature*> party)
: CreatureLib::Battling::CreatureParty(party) {}
Pokemon* GetAtIndex(int index) const {
return dynamic_cast<Pokemon*>(CreatureLib::Battling::CreatureParty::GetAtIndex(index));
ArbUt::BorrowedPtr<Pokemon> GetAtIndex(int index) const {
return CreatureLib::Battling::CreatureParty::GetAtIndex(index).As<Pokemon>();
}
};
}