summaryrefslogtreecommitdiffstats
path: root/src/Endianness.h (unfollow)
Commit message (Collapse)AuthorFilesLines
9 daysOverhaul endian handling in ByteBuffer and FastNBT (#5543)Ash1-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>
2015-07-09Fixes compilation failures on MacOSX 10.10Samuel Barney1-2/+2
* Replace old c-style casts with c++ casts * Added `-Wno-error=old-style-cast` to Protocol18x.cpp
2015-05-09CheckBasicStyle: checks spaces around * and &.Mattes D1-1/+1
2015-03-21Unified cByteBuffer types.Mattes D1-0/+12
cByteBuffer now reads and writes any of the [U]Int<N> types.
2015-03-17Changed Variable types of Endianness.h to uniform UInt* types from Globals.hbibo381-4/+4
2015-03-17Fixed double underscore identifiers in the Endianess.h file, which are reserved for implementation use. Bug #1715bibo381-8/+8
2014-07-26Endianness.h: undefined ntohll before redefiningarchshift1-0/+1
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-5/+5
2014-04-05Fixed Endiannes conversion routines for floats and doubles.madmaxoft1-2/+2
This bug has been introduced in 8825d30aabbee8cb2e452dc5a17deb6f9b6892a7. This change fixes #854.
2014-04-04Fixed some Clang warnings in protocols.madmaxoft1-14/+17
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-70/+70
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-07Rewritten all packets to use buffers instead of direct sockets, for future cSocketThreads compatibility.madmaxoft@gmail.com1-11/+29
Moved data sending from cPacket into cSocket git-svn-id: http://mc-server.googlecode.com/svn/trunk@240 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-4/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-04Added cRedstone to project filefaketruth1-6/+5
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
2011-11-03Fixed some redstone items and a bug that prevented floats from client to server packets reading correctly on 64 bit linux.admin@omencraft.com1-3/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@50 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+51
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6