Add nullability to large parts of the codebase
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-03-23 18:30:35 +01:00
parent beb2e44a0b
commit eccf2c9121
53 changed files with 240 additions and 206 deletions

View File

@@ -15,13 +15,13 @@ namespace CreatureLib::Battling {
/// for it.
class EventHook {
public:
typedef std::function<void(const CreatureLib::Battling::EventData*)> EventHookFunc;
typedef std::function<void(const CreatureLib::Battling::EventData* non_null)> EventHookFunc;
private:
std::vector<EventHookFunc> _listeners;
size_t _offset;
size_t _capacity;
u8* _memory = nullptr;
u8* nullable _memory = nullptr;
static constexpr size_t initialSize = 2048;
static constexpr size_t stepSize = 1024;