Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor cleanup changes #1021

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions include/etl/ipool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<uintptr_t>(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<uintptr_t>(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<uintptr_t>(p_next);

p_next = p_value;

Expand Down
6 changes: 3 additions & 3 deletions include/etl/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion include/etl/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading