Use Arbutils exception Macros, instead of own ones.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -22,7 +22,7 @@ namespace CreatureLib::Battling {
|
||||
HistoryHolder() : _offset(0), _capacity(2048) {
|
||||
auto ptr = malloc(_capacity);
|
||||
if (ptr == nullptr) {
|
||||
THROW_CREATURE("Out of memory.");
|
||||
THROW("Out of memory.");
|
||||
}
|
||||
_memory = static_cast<uint8_t*>(ptr);
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace CreatureLib::Battling {
|
||||
_capacity += stepSize;
|
||||
auto newPtr = realloc(_memory, _capacity);
|
||||
if (newPtr == nullptr) {
|
||||
THROW_CREATURE("Out of memory.");
|
||||
THROW("Out of memory.");
|
||||
}
|
||||
_memory = static_cast<uint8_t*>(newPtr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user