Increase max ref count

This commit is contained in:
Deukhoofd 2022-03-06 10:59:46 +01:00
parent 06c0953f63
commit 7b72219bf4
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 5 additions and 4 deletions

View File

@ -37,6 +37,7 @@
#include "as_atomic.h"
BEGIN_AS_NAMESPACE
const asUINT MAX_VALUE = 100000000;
asCAtomic::asCAtomic()
{
@ -47,7 +48,7 @@ asDWORD asCAtomic::get() const
{
// A very high ref count is highly unlikely. It most likely a problem with
// memory that has been overwritten or is being accessed after it was deleted.
asASSERT(value < 1000000);
asASSERT(value < MAX_VALUE);
return value;
}
@ -56,7 +57,7 @@ void asCAtomic::set(asDWORD val)
{
// A very high ref count is highly unlikely. It most likely a problem with
// memory that has been overwritten or is being accessed after it was deleted.
asASSERT(value < 1000000);
asASSERT(value < MAX_VALUE);
value = val;
}
@ -65,7 +66,7 @@ asDWORD asCAtomic::atomicInc()
{
// A very high ref count is highly unlikely. It most likely a problem with
// memory that has been overwritten or is being accessed after it was deleted.
asASSERT(value < 1000000);
asASSERT(value < MAX_VALUE);
return asAtomicInc((int&)value);
}
@ -74,7 +75,7 @@ asDWORD asCAtomic::atomicDec()
{
// A very high ref count is highly unlikely. It most likely a problem with
// memory that has been overwritten or is being accessed after it was deleted.
asASSERT(value < 1000000);
asASSERT(value < MAX_VALUE);
return asAtomicDec((int&)value);
}