finalize entity functions

This commit is contained in:
Folling 2025-01-02 09:39:08 +01:00
parent ba62206c0c
commit e6233cf3f2
No known key found for this signature in database
18 changed files with 523 additions and 181 deletions

View file

@ -11,6 +11,8 @@ void safe_strcpy(
size_t const dest_size
);
#define IKARUS_VOID_RETURN
#define IKARUS_SET_ERROR(msg, err_info) \
if (error_out != nullptr) { \
safe_strcpy( \
@ -140,9 +142,9 @@ void safe_strcpy(
IkarusErrorInfo_Client_InvalidInput \
);
#define IKARUS_FAIL_IF_NOT_EXIST(object, ret) \
#define IKARUS_FAIL_IF_NOT_EXIST_IMPL(exists_name, object, ret) \
IKARUS_VTRYRV_OR_FAIL( \
auto exists, \
auto exists_name, \
ret, \
fmt::format( \
"failed to check if {} exists", \
@ -159,7 +161,7 @@ void safe_strcpy(
); \
\
IKARUS_FAIL_IF( \
!exists, \
!exists_name, \
ret, \
fmt::format( \
"{} doesn't exist", \
@ -167,3 +169,6 @@ void safe_strcpy(
), \
IkarusErrorInfo_Client_NonExistent \
)
#define IKARUS_FAIL_IF_NOT_EXIST(object, ret) \
IKARUS_FAIL_IF_NOT_EXIST_IMPL(CPPBASE_UNIQUE_NAME(exists), object, ret)