Use Arbutils exception Macros, instead of own ones.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2020-08-17 12:18:01 +02:00
parent 9d5316edff
commit 98dacbccde
20 changed files with 44 additions and 60 deletions

View File

@@ -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);
}