summaryrefslogtreecommitdiffstats
path: root/src/Endianness.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul endian handling in ByteBuffer and FastNBT (#5543)Ash48 hours1-63/+120
| | | | | | | | | | | | | | | * 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>
* Fixes compilation failures on MacOSX 10.10Samuel Barney2015-07-091-2/+2
| | | | | * Replace old c-style casts with c++ casts * Added `-Wno-error=old-style-cast` to Protocol18x.cpp
* CheckBasicStyle: checks spaces around * and &.Mattes D2015-05-091-1/+1
|
* Unified cByteBuffer types.Mattes D2015-03-211-0/+12
| | | | cByteBuffer now reads and writes any of the [U]Int<N> types.
* Changed Variable types of Endianness.h to uniform UInt* types from Globals.hbibo382015-03-171-4/+4
|
* Fixed double underscore identifiers in the Endianess.h file, which are reserved for implementation use. Bug #1715bibo382015-03-171-8/+8
|
* Endianness.h: undefined ntohll before redefiningarchshift2014-07-261-0/+1
|
* Style: Normalized to no spaces before closing parenthesis.madmaxoft2014-07-211-5/+5
|
* Fixed Endiannes conversion routines for floats and doubles.madmaxoft2014-04-051-2/+2
| | | | | This bug has been introduced in 8825d30aabbee8cb2e452dc5a17deb6f9b6892a7. This change fixes #854.
* Fixed some Clang warnings in protocols.madmaxoft2014-04-041-14/+17
|
* Moved source to srcAlexander Harkness2013-11-241-0/+70