Fixes ItemLibrary compilation error in GCC.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
53bd6e7a94
commit
ecf8582c59
|
@ -8,7 +8,9 @@ namespace PkmnLib::Library {
|
|||
public:
|
||||
inline std::optional<ArbUt::BorrowedPtr<const Item>> TryGet(const ArbUt::BasicStringView& name) const {
|
||||
auto res = CreatureLib::Library::ItemLibrary::TryGet(name.GetHash());
|
||||
return reinterpret_cast<const std::optional<ArbUt::BorrowedPtr<const Item>>&>(res);
|
||||
if (!res.has_value())
|
||||
return {};
|
||||
return res.value().ForceAs<const Item>();
|
||||
}
|
||||
|
||||
inline ArbUt::BorrowedPtr<const Item> Get(const ArbUt::BasicStringView& name) const {
|
||||
|
|
Loading…
Reference in New Issue