Defensive programming.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-08-17 18:23:25 +02:00
parent f3721ad2a5
commit cc92cf1491
10 changed files with 67 additions and 26 deletions

View File

@@ -37,7 +37,7 @@ namespace PkmnLib::Battling {
_friendship(species->GetBaseHappiness()) {}
const ArbUt::BorrowedPtr<const Library::PokemonForme> GetForme() const {
return _variant.As<const Library::PokemonForme>();
return _variant.ForceAs<const Library::PokemonForme>();
}
inline bool IsShiny() const noexcept { return _coloring == 1; }