Cleanup of CInterface, removed operator-> on BorrowedPtr, as it throws when null.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -22,11 +22,6 @@ export Pokemon* PkmnLib_Pokemon_Construct(const BattleLibrary* library, const Pk
|
||||
|
||||
export void PkmnLib_Pokemon_Destruct(const Pokemon* p) { delete p; }
|
||||
|
||||
#define SIMPLE_GET_FUNC(type, name, returnType) \
|
||||
export returnType PkmnLib_##type##_##name(const PkmnLib::Battling::type* p) { return p->name(); }
|
||||
#define SIMPLE_GET_FUNC_SMART_PTR(type, name, returnType) \
|
||||
export returnType PkmnLib_##type##_##name(const PkmnLib::Battling::type* p) { return p->name().operator->(); }
|
||||
|
||||
SIMPLE_GET_FUNC(Pokemon, IsShiny, bool)
|
||||
SIMPLE_GET_FUNC_SMART_PTR(Pokemon, GetNature, const PkmnLib::Library::Nature*)
|
||||
|
||||
@@ -37,7 +32,4 @@ export uint8_t PkmnLib_Pokemon_GetIndividualValue(const Pokemon* p, CreatureLib:
|
||||
}
|
||||
export uint8_t PkmnLib_Pokemon_GetEffortValue(const Pokemon* p, CreatureLib::Library::Statistic stat) {
|
||||
return p->GetEffortValue(stat);
|
||||
}
|
||||
|
||||
#undef SIMPLE_GET_FUNC
|
||||
#undef SIMPLE_GET_FUNC_SMART_PTR
|
||||
}
|
||||
Reference in New Issue
Block a user