| Commit message (Collapse) | Author | Files | Lines |
|
* Overhaul endian handling in ByteBuffer and FastNBT
Rather than juggling "swapped" and "unswapped" versions of integers, different library functions, #defines, etc., simply always read everything byte-by-byte.
This works regardless of host CPU endian, got optimised down to either a normal load or a byteswap on every compiler I tested - only 1 instruction on most CPU architectures.
This commit introduces a "Bytes" array type to keep endian-sensitive data seperate from host data, alongside the needed C++ template machinery for it to work seamlessly. This approach is a little bit safer as well since you get length- and type-checking for most callsites.
* Remove remaining references to old-style endianness conversion, remove functions themselves.
---------
Co-authored-by: Alexander Harkness <me@bearbin.net>
|
|
* Replace old c-style casts with c++ casts
* Added `-Wno-error=old-style-cast` to Protocol18x.cpp
|
|
|
|
cByteBuffer now reads and writes any of the [U]Int<N> types.
|
|
|
|
|
|
|
|
|
|
This bug has been introduced in 8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.
This change fixes #854.
|
|
|
|
|
|
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
|
|
Moved data sending from cPacket into cSocket
git-svn-id: http://mc-server.googlecode.com/svn/trunk@240 0a769ca7-a7f5-676a-18bf-c427514a06d6
|
|
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
|
|
Changed NetworkToHostFloat4(), maybe it works now on 64bit linux
git-svn-id: http://mc-server.googlecode.com/svn/trunk@54 0a769ca7-a7f5-676a-18bf-c427514a06d6
|
|
git-svn-id: http://mc-server.googlecode.com/svn/trunk@50 0a769ca7-a7f5-676a-18bf-c427514a06d6
|
|
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6
|