mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user