mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-13 07:06:10 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user