Update for latest nazarautils
This commit is contained in:
@@ -105,12 +105,9 @@ namespace Nz
|
||||
|
||||
ByteArray CRC32Hasher::End()
|
||||
{
|
||||
m_crc ^= 0xFFFFFFFF;
|
||||
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
m_crc = SwapBytes(m_crc);
|
||||
#endif
|
||||
|
||||
#ifdef NAZARA_BIG_ENDIAN
|
||||
m_crc = ByteSwap(m_crc ^ 0xFFFFFFFF);
|
||||
#endif
|
||||
return ByteArray(reinterpret_cast<UInt8*>(&m_crc), 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,9 @@ namespace Nz
|
||||
|
||||
ByteArray CRC64Hasher::End()
|
||||
{
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
SwapBytes(&m_crc, sizeof(UInt64));
|
||||
#endif
|
||||
|
||||
#ifdef NAZARA_BIG_ENDIAN
|
||||
m_crc = ByteSwap(m_crc);
|
||||
#endif
|
||||
return ByteArray(reinterpret_cast<UInt8*>(&m_crc), 8);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ namespace Nz
|
||||
|
||||
UInt16 fletcher = (m_sum2 << 8) | m_sum1;
|
||||
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
fletcher = SwapBytes(fletcher);
|
||||
#endif
|
||||
#ifdef NAZARA_BIG_ENDIAN
|
||||
fletcher = ByteSwap(fletcher);
|
||||
#endif
|
||||
|
||||
return ByteArray(reinterpret_cast<UInt8*>(&fletcher), 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user