Fixed warnings.

This commit is contained in:
tomrus88 2009-05-31 12:13:40 +04:00
parent 8d6b26b6ab
commit f7c733cd21
4 changed files with 20 additions and 13 deletions

View file

@ -612,7 +612,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
// 2 specialized loops for speed optimization in non-unit case
if(isType(TYPEMASK_UNIT)) // unit (creature/player) case
{
for( uint16 index = 0; index < m_valuesCount; index ++ )
for( uint16 index = 0; index < m_valuesCount; ++index )
{
if( updateMask->GetBit( index ) )
{
@ -663,7 +663,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
}
else if(isType(TYPEMASK_GAMEOBJECT)) // gameobject case
{
for( uint16 index = 0; index < m_valuesCount; index ++ )
for( uint16 index = 0; index < m_valuesCount; ++index )
{
if( updateMask->GetBit( index ) )
{
@ -695,7 +695,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
}
else // other objects case (no special index checks)
{
for( uint16 index = 0; index < m_valuesCount; index ++ )
for( uint16 index = 0; index < m_valuesCount; ++index )
{
if( updateMask->GetBit( index ) )
{
@ -708,7 +708,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
void Object::ClearUpdateMask(bool remove)
{
for( uint16 index = 0; index < m_valuesCount; index ++ )
for( uint16 index = 0; index < m_valuesCount; ++index )
{
if(m_uint32Values_mirror[index]!= m_uint32Values[index])
m_uint32Values_mirror[index] = m_uint32Values[index];
@ -756,7 +756,7 @@ bool Object::LoadValues(const char* data)
void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const
{
for( uint16 index = 0; index < m_valuesCount; index ++ )
for( uint16 index = 0; index < m_valuesCount; ++index )
{
if(m_uint32Values_mirror[index]!= m_uint32Values[index])
updateMask->SetBit(index);
@ -765,7 +765,7 @@ void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const
void Object::_SetCreateBits(UpdateMask *updateMask, Player* /*target*/) const
{
for( uint16 index = 0; index < m_valuesCount; index++ )
for( uint16 index = 0; index < m_valuesCount; ++index )
{
if(GetUInt32Value(index) != 0)
updateMask->SetBit(index);
@ -884,7 +884,7 @@ void Object::SetUInt16Value( uint16 index, uint8 offset, uint16 value )
return;
}
if(uint8(m_uint32Values[ index ] >> (offset * 16)) != value)
if(uint16(m_uint32Values[ index ] >> (offset * 16)) != value)
{
m_uint32Values[ index ] &= ~uint32(uint32(0xFFFF) << (offset * 16));
m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 16));