From 6352c7a63e68ed55554aea11faf004378482c503 Mon Sep 17 00:00:00 2001 From: BartolomeyKant Date: Fri, 4 Sep 2026 20:57:31 +0500 Subject: [PATCH 1/3] fix compile on stupid msvc --- aether/api_protocol/api_message.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 From 64704eafbf2f7401d29f8252e5a9f2f23abde5e5 Mon Sep 17 00:00:00 2001 From: BartolomeyKant Date: Fri, 4 Sep 2026 20:57:40 +0500 Subject: [PATCH 2/3] make event handler max align --- aether/config.h | 2 +- aether/events/event_handler.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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" From 1cf7634097a084cc0330198d1ba100e7607f59c9 Mon Sep 17 00:00:00 2001 From: BartolomeyKant Date: Fri, 4 Sep 2026 20:57:47 +0500 Subject: [PATCH 3/3] add contract asserts --- aether/tasks/details/task_queues.h | 4 ++++ 1 file changed, 4 insertions(+) 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; }