win32 changes. now including windows.h with WIN32_LEAN_AND_MEAN

to avoid including some stuff we don't want (like winsock).
This commit is contained in:
crs
2002-06-10 16:49:46 +00:00
parent 500990b153
commit 68940e58f3
12 changed files with 117 additions and 45 deletions

View File

@@ -125,8 +125,8 @@ UInt16 CNetwork::swaphtons(UInt16 v)
{
static const union { UInt16 s; UInt8 b[2]; } s_endian = { 0x1234 };
if (s_endian.b[0] == 0x34)
return ((v & 0xff00u) >> 8) |
((v & 0x00ffu) << 8);
return static_cast<UInt16>( ((v & 0xff00u) >> 8) |
((v & 0x00ffu) << 8));
else
return v;
}