summaryrefslogtreecommitdiffstats
path: root/src/Endianness.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-24 13:09:41 +0100
committerMattes D <github@xoft.cz>2015-03-24 13:09:41 +0100
commite5a7a730ed4f26eae896c56391bf3d2b5fecb852 (patch)
tree0209c1567f60af60999f3aeeb513a72f9eab2743 /src/Endianness.h
parentMerge pull request #1775 from tommysanterre/terrainheightfix (diff)
parentAdded VarInt64, normalized cPacketizer datatype names. (diff)
downloadcuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar
cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.gz
cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.bz2
cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.lz
cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.xz
cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.zst
cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.zip
Diffstat (limited to 'src/Endianness.h')
-rw-r--r--src/Endianness.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Endianness.h b/src/Endianness.h
index 5692b3811..ed9637fcc 100644
--- a/src/Endianness.h
+++ b/src/Endianness.h
@@ -59,6 +59,18 @@ inline Int64 NetworkToHostLong8(const void * a_Value)
+inline UInt64 NetworkToHostULong8(const void * a_Value)
+{
+ UInt64 buf;
+ memcpy(&buf, a_Value, 8);
+ buf = ntohll(buf);
+ return buf;
+}
+
+
+
+
+
inline float NetworkToHostFloat4(const void * a_Value)
{
UInt32 buf;