mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Merge pull request #50 from zerhacken/minor-fixes
Const correctness fixes in threading.h and wrapped_pool.h
This commit is contained in:
@@ -52,7 +52,7 @@ class TryScopedLock
|
||||
~TryScopedLock()
|
||||
{ if(m_Owned) m_CS->Unlock(); }
|
||||
|
||||
bool HasLock()
|
||||
bool HasLock() const
|
||||
{
|
||||
return m_Owned;
|
||||
}
|
||||
|
||||
@@ -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