Closed FSMaxB closed 7 years ago
After every allocation it has to be checked if the allocation was successful and an error thrown in case it wasn't.
It would be nice to have some kind of macro that does this in one step. It could be added to return_status:
return_status
#define throw_on_failed_alloc(pointer) if (pointer == NULL) {\ throw(ALLOCATION_FAILED, "Failed to allocate memory.");\ }
lib
test
After the C++ porting, all allocation failures will automatically throw exceptions, so no need to manually check for them.
After every allocation it has to be checked if the allocation was successful and an error thrown in case it wasn't.
It would be nice to have some kind of macro that does this in one step. It could be added to
return_status
: