From f735c2e9d4f9d0c2f9803332f4b63b7e435b01eb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 15 Mar 2023 11:51:51 +0100 Subject: [PATCH 1/3] assert size larger than 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 97ade7e8f..dde8eb16f 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]; From 066dd0d397a4ff0d94f3d193e1ecb8e64f2e7541 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 15 Mar 2023 11:52:20 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cc07f78e..3a1ce06e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). # [unreleased] +## Changed + +- Assert than `FixedArrayList` is larger than 0 at compile time. + # [v6.0.0] 2023-02-10 ## Fixes From b057250bfb3bb87943797c4b32eb17f22558907a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 15 Mar 2023 11:53:12 +0100 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a1ce06e1..c56885d6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Changed -- Assert than `FixedArrayList` is larger than 0 at compile time. +- Assert that `FixedArrayList` is larger than 0 at compile time. # [v6.0.0] 2023-02-10