ot::Pool::GetIndexOf() const method
Returns the associated index of a given entry from the pool. The @p aEntry MUST be from the pool, otherwise the behavior of this method is undefined.
Syntax
uint16_t GetIndexOf(const Type &aEntry) const; Arguments
aEntry
A reference to an entry from the pool.
Return value
The associated index of @p aEntry.
![]()
uint16_t GetIndexOf(const Type &aEntry) const { return static_cast<uint16_t>(&aEntry - mPool); }