From 5b0ea91222a6b8efb2f4562cfecbcb735dfeedd5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 29 Nov 2022 23:24:29 +0100 Subject: [PATCH] statically assert MAX_SIZE > 0 --- src/fsfw/container/FixedArrayList.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fsfw/container/FixedArrayList.h b/src/fsfw/container/FixedArrayList.h index 97ade7e8..dde8eb16 100644 --- a/src/fsfw/container/FixedArrayList.h +++ b/src/fsfw/container/FixedArrayList.h @@ -12,6 +12,7 @@ template class FixedArrayList : public ArrayList { static_assert(MAX_SIZE <= std::numeric_limits::max(), "count_t is not large enough to hold MAX_SIZE"); + static_assert(MAX_SIZE > 0, "MAX_SIZE is 0"); private: T data[MAX_SIZE];