From b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 21 Mar 2015 13:00:20 +0100 Subject: Unified cByteBuffer types. cByteBuffer now reads and writes any of the [U]Int types. --- src/Endianness.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Endianness.h') 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; -- cgit v1.2.3