From 5e6e6830f66506a939ae407114facdb32434cd10 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Tue, 24 Dec 2024 17:32:16 +0100 Subject: [PATCH] Cleanup --- include/etl/ipool.h | 30 ++---------------------------- include/etl/memory.h | 6 +++--- include/etl/queue.h | 3 +-- include/etl/span.h | 1 - 4 files changed, 6 insertions(+), 34 deletions(-) diff --git a/include/etl/ipool.h b/include/etl/ipool.h index ce4c317e0..05e9f8485 100644 --- a/include/etl/ipool.h +++ b/include/etl/ipool.h @@ -377,39 +377,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 b285068bf..7003426f9 100644 --- a/include/etl/memory.h +++ b/include/etl/memory.h @@ -2323,9 +2323,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/queue.h b/include/etl/queue.h index b704d8a1c..10ea356e6 100644 --- a/include/etl/queue.h +++ b/include/etl/queue.h @@ -337,7 +337,7 @@ namespace etl //************************************************************************* /// Constructs a value in the queue 'in place'. /// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full. - ///\param value The value to use to construct the item to push to the queue. + ///\param args The arguments to use to construct the item in the queue. //************************************************************************* template void emplace(Args && ... args) @@ -352,7 +352,6 @@ namespace etl //************************************************************************* /// Constructs a value in the queue 'in place'. /// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full. - ///\param value The value to use to construct the item to push to the queue. //************************************************************************* void emplace() { diff --git a/include/etl/span.h b/include/etl/span.h index f1077ea77..f659ac7a1 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"