summaryrefslogtreecommitdiffstats
path: root/src/ByteBuffer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-11-07 23:15:07 +0100
committerAlexander Harkness <me@bearbin.net>2016-12-12 15:32:32 +0100
commit8c6d0b51c719e1817e308375d129b17ede3b82fc (patch)
tree8aa23d1db5e4198f6aeed5091ad6adedc12fea35 /src/ByteBuffer.cpp
parentMerge pull request #3476 from Seadragon91/patch-1 (diff)
downloadcuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.gz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.bz2
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.lz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.xz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.zst
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.zip
Diffstat (limited to '')
-rw-r--r--src/ByteBuffer.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp
index 6cfb66f9a..1a4dc8bb8 100644
--- a/src/ByteBuffer.cpp
+++ b/src/ByteBuffer.cpp
@@ -22,27 +22,6 @@ Unfortunately it is very slow, so it is disabled even for regular DEBUG builds.
-// Try to determine endianness:
-#if ( \
- defined(__i386__) || defined(__alpha__) || \
- defined(__ia64) || defined(__ia64__) || \
- defined(_M_IX86) || defined(_M_IA64) || \
- defined(_M_ALPHA) || defined(__amd64) || \
- defined(__amd64__) || defined(_M_AMD64) || \
- defined(__x86_64) || defined(__x86_64__) || \
- defined(_M_X64) || defined(__bfin__) || \
- defined(__ARMEL__) || defined(__AARCH64EL__) || \
- (defined(_WIN32) && defined(__ARM__) && defined(_MSC_VER)) \
-)
- #define IS_LITTLE_ENDIAN
-#elif ( \
- defined (__ARMEB__) || defined(__sparc) || defined(__powerpc__) || defined(__POWERPC__) \
-)
- #define IS_BIG_ENDIAN
-#else
- #error Cannot determine endianness of this platform
-#endif
-
// If a string sent over the protocol is larger than this, a warning is emitted to the console
#define MAX_STRING_SIZE (512 KiB)
@@ -754,22 +733,6 @@ bool cByteBuffer::WriteVarUTF8String(const AString & a_Value)
-bool cByteBuffer::WriteLEInt32(Int32 a_Value)
-{
- CHECK_THREAD
- CheckValid();
- #ifdef IS_LITTLE_ENDIAN
- return WriteBuf(reinterpret_cast<const char *>(&a_Value), 4);
- #else
- int Value = ((a_Value >> 24) & 0xff) | ((a_Value >> 16) & 0xff00) | ((a_Value >> 8) & 0xff0000) | (a_Value & 0xff000000);
- return WriteBuf(reinterpret_cast<const char *>(&Value), 4);
- #endif
-}
-
-
-
-
-
bool cByteBuffer::WritePosition64(Int32 a_BlockX, Int32 a_BlockY, Int32 a_BlockZ)
{
CHECK_THREAD