Merge pull request #50 from zerhacken/minor-fixes

Const correctness fixes in threading.h and wrapped_pool.h
This commit is contained in:
baldurk
2014-05-07 19:55:43 +01:00
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ class TryScopedLock
~TryScopedLock()
{ if(m_Owned) m_CS->Unlock(); }
bool HasLock()
bool HasLock() const
{
return m_Owned;
}
+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];
}