Skip to content

Commit

Permalink
Codefix: silence [maybe-]uninitialized warnings for Pool::PoolItem::o…
Browse files Browse the repository at this point in the history
…perator delete()
  • Loading branch information
glx22 committed Dec 27, 2024
1 parent 0921ed7 commit 4494d03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/pool_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,15 @@ struct Pool : PoolBase {
* @param p memory to free
* @note the item has to be allocated in the pool!
*/
IGNORE_UNINITIALIZED_WARNING_START
inline void operator delete(void *p)
{
if (p == nullptr) return;
Titem *pn = static_cast<Titem *>(p);
assert(pn == Tpool->Get(pn->index));
Tpool->FreeItem(pn->index);
}
IGNORE_UNINITIALIZED_WARNING_STOP

/**
* Allocates space for new Titem with given index
Expand Down

0 comments on commit 4494d03

Please sign in to comment.