Switch from Nz prefix to namespace Nz

What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
Lynix
2015-09-25 19:20:05 +02:00
parent c214251ecf
commit df8da275c4
609 changed files with 68265 additions and 66534 deletions

View File

@@ -5,23 +5,26 @@
#include <algorithm>
#include <Nazara/Core/Debug.hpp>
inline void NzByteSwap(void* buffer, unsigned int size)
namespace Nz
{
nzUInt8* bytes = reinterpret_cast<nzUInt8*>(buffer);
unsigned int i = 0;
unsigned int j = size-1;
inline Endianness GetPlatformEndianness()
{
#if defined(NAZARA_BIG_ENDIAN)
return Endianness_BigEndian;
#elif defined(NAZARA_LITTLE_ENDIAN)
return Endianness_LittleEndian;
#endif
}
while (i < j)
std::swap(bytes[i++], bytes[j--]);
}
inline void SwapBytes(void* buffer, unsigned int size)
{
UInt8* bytes = reinterpret_cast<UInt8*>(buffer);
unsigned int i = 0;
unsigned int j = size-1;
inline nzEndianness NzGetPlatformEndianness()
{
#if defined(NAZARA_BIG_ENDIAN)
return nzEndianness_BigEndian;
#elif defined(NAZARA_LITTLE_ENDIAN)
return nzEndianness_LittleEndian;
#endif
while (i < j)
std::swap(bytes[i++], bytes[j--]);
}
}
#include <Nazara/Core/DebugOff.hpp>