mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Use standard (f)abs functions
This commit is contained in:
@ -134,7 +134,7 @@ void plSynchedObject::IAppendSynchedValueFriend(plSynchedValueBase* v)
|
||||
uint8_t plSynchedObject::RegisterSynchedValue(plSynchedValueBase* v)
|
||||
{
|
||||
int32_t addrOff = ((int32_t)v - (int32_t)this)>>2;
|
||||
hsAssert(hsABS(addrOff) < (uint32_t)(1<<(sizeof(AddrOffsetType)<<3)), "address offset overflow");
|
||||
hsAssert(abs(addrOff) < (uint32_t)(1<<(sizeof(AddrOffsetType)<<3)), "address offset overflow");
|
||||
IAppendSynchedValueAddrOffset((AddrOffsetType)addrOff);
|
||||
int32_t idx = fNumSynchedValues-1;
|
||||
hsAssert(idx<256, "index too big");
|
||||
|
@ -87,7 +87,7 @@ protected:
|
||||
// is set to his address so we can automatically get at it during construction.
|
||||
fFlags=0;
|
||||
int32_t off = (int32_t)plSynchedObject::GetStaticSynchedObject() - (int32_t)this;
|
||||
if ( hsABS(off) < (1<<(sizeof(fSynchedObjectAddrOffset)<<3)) )
|
||||
if ( abs(off) < (1<<(sizeof(fSynchedObjectAddrOffset)<<3)) )
|
||||
fSynchedObjectAddrOffset = (int16_t)off;
|
||||
else
|
||||
fSynchedObjectAddrOffset=-1;
|
||||
|
Reference in New Issue
Block a user