diff --git a/aether/api_protocol/api_message.h b/aether/api_protocol/api_message.h index f778e08d..05251322 100644 --- a/aether/api_protocol/api_message.h +++ b/aether/api_protocol/api_message.h @@ -20,7 +20,6 @@ #include #include #include -#include #include "aether-miscpp/serialization/serialization.h" @@ -67,8 +66,9 @@ struct Serializer> { return res; }, meta.value.fields); + } else { + return Ok{seri::good}; } - return Ok{seri::good}; } SeriResult Deseri(A& archive, Meta> meta) const { @@ -81,8 +81,9 @@ struct Serializer> { return res; }, meta.value.fields); + } else { + return Ok{seri::good}; } - return Ok{seri::good}; } }; } // namespace seri diff --git a/aether/config.h b/aether/config.h index 543cd7da..eacd198e 100644 --- a/aether/config.h +++ b/aether/config.h @@ -532,7 +532,7 @@ # define AE_EVENT_HANDLER_MAX_SIZE 48 #endif #ifndef AE_EVENT_HANDLER_ALIGN -# define AE_EVENT_HANDLER_ALIGN (alignof(void*)) +# define AE_EVENT_HANDLER_ALIGN (alignof(std::max_align_t)) #endif #ifndef NDEBUG diff --git a/aether/events/event_handler.h b/aether/events/event_handler.h index 5e1f12b6..22c5c186 100644 --- a/aether/events/event_handler.h +++ b/aether/events/event_handler.h @@ -17,6 +17,7 @@ #ifndef AETHER_EVENTS_EVENT_HANDLER_H_ #define AETHER_EVENTS_EVENT_HANDLER_H_ +#include #include #include "aether-miscpp/types/small_function.h" diff --git a/aether/tasks/details/task_queues.h b/aether/tasks/details/task_queues.h index abec823c..1ccb5567 100644 --- a/aether/tasks/details/task_queues.h +++ b/aether/tasks/details/task_queues.h @@ -99,6 +99,8 @@ class TaskQueue : TaskQueueBase { using base::ReclaimInactive; bool Add(ITask* p) { + // this is contract, p should not be null + assert(p != nullptr); if (base::list_.size() == base::list_.max_size()) { return false; } @@ -139,6 +141,8 @@ class DelayedTaskQueue : TaskQueueBase, Capacity, Pool> { using base::ReclaimInactive; bool Add(IDelayedTask* p) { + // this is contract, p should not be null + assert(p != nullptr); if (base::list_.size() == base::list_.max_size()) { return false; }