Update to newer CreatureLib.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-07-04 15:50:30 +02:00
parent 698bc62b47
commit 7f1bc252ba
49 changed files with 207 additions and 237 deletions

View File

@@ -7,7 +7,7 @@
namespace PkmnLib::Library {
class SpeciesLibrary : public CreatureLib::Library::SpeciesLibrary {
public:
inline bool TryGet(const ArbUt::CaseInsensitiveConstString& name,
inline bool TryGet(const ArbUt::BasicStringView& name,
ArbUt::BorrowedPtr<const PokemonSpecies>& outSpecies) const {
auto v = outSpecies.As<const PokemonSpecies::CreatureSpecies>();
auto res = CreatureLib::Library::SpeciesLibrary::TryGet(name, v);
@@ -15,15 +15,15 @@ namespace PkmnLib::Library {
return res;
}
inline ArbUt::BorrowedPtr<const PokemonSpecies> Get(const ArbUt::CaseInsensitiveConstString& name) const {
inline ArbUt::BorrowedPtr<const PokemonSpecies> Get(const ArbUt::BasicStringView& name) const {
return CreatureLib::Library::SpeciesLibrary::Get(name).As<const PokemonSpecies>();
}
ArbUt::BorrowedPtr<const PokemonSpecies> operator[](const ArbUt::CaseInsensitiveConstString& name) const {
ArbUt::BorrowedPtr<const PokemonSpecies> operator[](const ArbUt::BasicStringView& name) const {
return Get(name);
}
void Insert(const ArbUt::CaseInsensitiveConstString& name, const PokemonSpecies* species) {
void Insert(const ArbUt::StringView& name, const PokemonSpecies* species) {
CreatureLib::Library::SpeciesLibrary::Insert(name, species);
}
};