wrapped pool: IsAlloc constness

This commit changes WrappingPool::IsAlloc to take a const pointer as argument
as pointer isnt modified. ItemPool::IsAlloc is changed to a const function
taking a const poiner as argument.
This commit is contained in:
Rasmus Christian Pedersen
2014-05-07 20:27:09 +02:00
parent 37a5f1c8e1
commit 01da98996b
+2 -2
View File
@@ -79,7 +79,7 @@ class WrappingPool
return m_AdditionalPools.back()->Allocate();
}
bool IsAlloc(void *p)
bool IsAlloc(const void *p)
{
// we can check the immediate pool without locking
if(m_ImmediatePool.IsAlloc(p))
@@ -219,7 +219,7 @@ class WrappingPool
#endif
}
bool IsAlloc(void *p)
bool IsAlloc(const void *p) const
{
return p >= &items[0] && p < &items[PoolCount];
}