Return optional pointer instead of raw pointers in Pokemon::GetMoves
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-04-23 11:53:00 +02:00
parent 939cf4e328
commit 1c66aa8696
2 changed files with 4 additions and 4 deletions

View File

@@ -42,8 +42,8 @@ namespace PkmnLib::Battling {
inline bool IsShiny() const noexcept { return _coloring == 1; }
const ArbUt::List<LearnedMove*>& GetMoves() const {
return reinterpret_cast<const ArbUt::List<LearnedMove*>&>(_attacks);
const ArbUt::List<ArbUt::OptionalBorrowedPtr<LearnedMove>>& GetMoves() const {
return reinterpret_cast<const ArbUt::List<ArbUt::OptionalBorrowedPtr<LearnedMove>>&>(_attacks);
}
inline const ArbUt::BorrowedPtr<const PkmnLib::Library::Nature>& GetNature() const noexcept { return _nature; }