From 41f5c0b6bca0c706f42a8e12de001e31bf908e8b Mon Sep 17 00:00:00 2001 From: rolandreichweinbmw Date: Fri, 31 Jan 2025 15:44:43 +0100 Subject: [PATCH 1/2] Cleanup (#1021) Co-authored-by: John Wellbelove --- include/etl/ipool.h | 30 ++---------------------------- include/etl/memory.h | 6 +++--- include/etl/span.h | 1 - 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/include/etl/ipool.h b/include/etl/ipool.h index 88e03e46..94292774 100644 --- a/include/etl/ipool.h +++ b/include/etl/ipool.h @@ -385,39 +385,13 @@ namespace etl //************************************************************************* void release_item(char* p_value) { - //// Does it belong to us? - //ETL_ASSERT(is_item_in_pool(p_value), ETL_ERROR(pool_object_not_in_pool)); - - //if (p_next != ETL_NULLPTR) - //{ - // // Point it to the current free item. - // *(uintptr_t*)p_value = reinterpret_cast(p_next); - //} - //else - //{ - // // This is the only free item. - // *((uintptr_t*)p_value) = 0; - //} - - //p_next = p_value; - - //--items_allocated; - // Does it belong to us? ETL_ASSERT(is_item_in_pool(p_value), ETL_ERROR(pool_object_not_in_pool)); if (items_allocated > 0) { - if (p_next != ETL_NULLPTR) - { - // Point it to the current free item. - *(uintptr_t*)p_value = reinterpret_cast(p_next); - } - else - { - // This is the only free item. - *((uintptr_t*)p_value) = 0; - } + // Point it to the current free item. + *(uintptr_t*)p_value = reinterpret_cast(p_next); p_next = p_value; diff --git a/include/etl/memory.h b/include/etl/memory.h index 10b5cef6..ca72656b 100644 --- a/include/etl/memory.h +++ b/include/etl/memory.h @@ -2366,9 +2366,9 @@ namespace etl //*************************************************************************** /// Template wrapper for memcmp. - /// \param source begin - /// \param source end - /// \param destination begin + /// \param sb Source begin + /// \param se Source end + /// \param db Destination begin /// \return < 0 The first byte that does not match in both memory blocks has a lower value in 'sb' than in 'db' when evaluated as unsigned char values. /// 0 The contents of both memory blocks are equal /// > 0 The first byte that does not match in both memory blocks has a greater value in 'sb' than in 'db' when evaluated as unsigned char values. diff --git a/include/etl/span.h b/include/etl/span.h index 775f9540..ea8ad3b1 100644 --- a/include/etl/span.h +++ b/include/etl/span.h @@ -39,7 +39,6 @@ SOFTWARE. #include "hash.h" #include "type_traits.h" #include "integral_limits.h" -#include "memory.h" #include "array.h" #include "byte.h" #include "static_assert.h" From 96cdb2cbb13eb8c27894316287222f5124d60111 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sat, 1 Feb 2025 17:54:25 +0000 Subject: [PATCH 2/2] Re-included header --- include/etl/span.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/etl/span.h b/include/etl/span.h index ea8ad3b1..775f9540 100644 --- a/include/etl/span.h +++ b/include/etl/span.h @@ -39,6 +39,7 @@ SOFTWARE. #include "hash.h" #include "type_traits.h" #include "integral_limits.h" +#include "memory.h" #include "array.h" #include "byte.h" #include "static_assert.h"