Update to latest Arbutils, use new integer defines

This commit is contained in:
2022-03-23 13:56:45 +01:00
parent 52127f6555
commit 3cc19de61f
102 changed files with 687 additions and 742 deletions

View File

@@ -21,7 +21,7 @@ namespace CreatureLib::Battling {
std::vector<EventHookFunc> _listeners;
size_t _offset;
size_t _capacity;
uint8_t* _memory = nullptr;
u8* _memory = nullptr;
static constexpr size_t initialSize = 2048;
static constexpr size_t stepSize = 1024;
@@ -32,7 +32,7 @@ namespace CreatureLib::Battling {
if (ptr == nullptr) {
THROW("Out of memory.");
}
_memory = static_cast<uint8_t*>(ptr);
_memory = static_cast<u8*>(ptr);
}
EventHook(const EventHook&) = delete;
EventHook& operator=(const EventHook&) = delete;
@@ -52,9 +52,9 @@ namespace CreatureLib::Battling {
if (newPtr == nullptr) {
THROW("Out of memory.");
}
_memory = static_cast<uint8_t*>(newPtr);
_memory = static_cast<u8*>(newPtr);
}
uint8_t* ptr = _memory + _offset;
u8* ptr = _memory + _offset;
T* event = new (ptr) T(args...);
_offset += sizeof(T);
for (const auto& listener : _listeners) {