mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 12:49:10 +00:00
Fix Endian functions names in hsTypes and hsStream.
Function and macro names for endianness were previously vague, and on big-endian systems entirely misleading. The names are now properly descriptive of what they actually do.
This commit is contained in:
@ -149,16 +149,16 @@ std::string plNetAddress::AsString() const
|
||||
|
||||
void plNetAddress::Read(hsStream * s)
|
||||
{
|
||||
s->ReadSwap((UInt32*)&fAddr.sin_addr.s_addr);
|
||||
s->ReadSwap(&fAddr.sin_port);
|
||||
s->ReadSwap(&fAddr.sin_family);
|
||||
s->ReadLE((UInt32*)&fAddr.sin_addr.s_addr);
|
||||
s->ReadLE(&fAddr.sin_port);
|
||||
s->ReadLE(&fAddr.sin_family);
|
||||
}
|
||||
|
||||
void plNetAddress::Write(hsStream * s)
|
||||
{
|
||||
s->WriteSwap((UInt32)fAddr.sin_addr.s_addr);
|
||||
s->WriteSwap(fAddr.sin_port);
|
||||
s->WriteSwap(fAddr.sin_family);
|
||||
s->WriteLE((UInt32)fAddr.sin_addr.s_addr);
|
||||
s->WriteLE(fAddr.sin_port);
|
||||
s->WriteLE(fAddr.sin_family);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user