LoadItemScript should return a borrowed ptr
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2022-05-15 10:00:25 +02:00
parent 727aab37d7
commit f13b78e297
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 2 additions and 2 deletions

View File

@ -16,5 +16,5 @@ export_func u8 CreatureLib_ScriptResolver_LoadScript(BattleScript*& out, ScriptR
export_func u8 CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p, export_func u8 CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
const CreatureLib::Library::Item* item) { const CreatureLib::Library::Item* item) {
Try(out = p->LoadItemScript(item).TakeOwnership();) Try(out = p->LoadItemScript(item);)
}; };

View File

@ -24,7 +24,7 @@ namespace CreatureLib::Battling {
return nullptr; return nullptr;
}; };
virtual ArbUt::OptionalUniquePtr<ItemUseScript> virtual ArbUt::OptionalBorrowedPtr<ItemUseScript>
LoadItemScript([[maybe_unused]] const CreatureLib::Library::Item* non_null item) { LoadItemScript([[maybe_unused]] const CreatureLib::Library::Item* non_null item) {
return nullptr; return nullptr;
}; };