X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsupport%2Ffnetorderstream.cpp;h=ffa26f0a6a5b6f7363a9dc267b9521340500d171;hp=569984c22a5f293e754cf05e01743f0b0650b676;hb=55426f4170ed9dc777c3cec3741e4a59e6eebd38;hpb=2debde82a721c0cf5bdf6642ace3290f83bb21a4 diff --git a/libctsupport/fnetorderstream.cpp b/libctsupport/fnetorderstream.cpp index 569984c..ffa26f0 100644 --- a/libctsupport/fnetorderstream.cpp +++ b/libctsupport/fnetorderstream.cpp @@ -48,133 +48,133 @@ ConvertReverseNetworkOrder (void* buffer, size_t bytes) #endif } -fnetorderstream& fnetorderstream::writeInt16 (kuint16 n) { +void +fnetorderstream::writeInt16 (kuint16 n) { #ifndef WORDS_BIGENDIAN SwapBytes2 (&n); #endif write (reinterpret_cast(&n), 2); - return (*this); } -fnetorderstream& fnetorderstream::writeInt32 (kuint32 n) { +void +fnetorderstream::writeInt32 (kuint32 n) { #ifndef WORDS_BIGENDIAN SwapBytes4(&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -fnetorderstream& fnetorderstream::writeFloat32 (kfloat32 n) { +void +fnetorderstream::writeFloat32 (kfloat32 n) { #ifndef WORDS_BIGENDIAN SwapBytes4 (&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -fnetorderstream& fnetorderstream::writeFloat64 (kfloat64 n) { +void +fnetorderstream::writeFloat64 (kfloat64 n) { #ifndef WORDS_BIGENDIAN SwapBytes8 (&n); #endif write (reinterpret_cast(&n), 8); - return (*this); } -fnetorderstream& fnetorderstream::readInt16 (kuint16& n) { +void +fnetorderstream::readInt16 (kuint16& n) { read (reinterpret_cast(&n), 2); #ifndef WORDS_BIGENDIAN SwapBytes2 (&n); #endif - return (*this); } -fnetorderstream& fnetorderstream::readInt32 (kuint32& n) { +void +fnetorderstream::readInt32 (kuint32& n) { read (reinterpret_cast(&n), 4); #ifndef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -fnetorderstream& fnetorderstream::readFloat32 (kfloat32& n) { +void +fnetorderstream::readFloat32 (kfloat32& n) { read (reinterpret_cast(&n), 4); #ifndef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -fnetorderstream& fnetorderstream::readFloat64 (kfloat64& n) { +void +fnetorderstream::readFloat64 (kfloat64& n) { read (reinterpret_cast(&n), 8); #ifndef WORDS_BIGENDIAN SwapBytes8 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::writeInt16 (kuint16 n) { +void +frnetorderstream::writeInt16 (kuint16 n) { #ifdef WORDS_BIGENDIAN SwapBytes2 (&n); #endif write (reinterpret_cast(&n), 2); - return (*this); } -frnetorderstream& frnetorderstream::writeInt32 (kuint32 n) { +void +frnetorderstream::writeInt32 (kuint32 n) { #ifdef WORDS_BIGENDIAN SwapBytes4(&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -frnetorderstream& frnetorderstream::writeFloat32 (kfloat32 n) { +void +frnetorderstream::writeFloat32 (kfloat32 n) { #ifdef WORDS_BIGENDIAN SwapBytes4 (&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -frnetorderstream& frnetorderstream::writeFloat64 (kfloat64 n) { +void +frnetorderstream::writeFloat64 (kfloat64 n) { #ifdef WORDS_BIGENDIAN SwapBytes8 (&n); #endif write (reinterpret_cast(&n), 8); - return (*this); } -frnetorderstream& frnetorderstream::readInt16 (kuint16& n) { +void +frnetorderstream::readInt16 (kuint16& n) { read (reinterpret_cast(&n), 2); #ifdef WORDS_BIGENDIAN SwapBytes2 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::readInt32 (kuint32& n) { +void +frnetorderstream::readInt32 (kuint32& n) { read (reinterpret_cast(&n), 4); #ifdef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::readFloat32 (kfloat32& n) { +void +frnetorderstream::readFloat32 (kfloat32& n) { read (reinterpret_cast(&n), 4); #ifdef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::readFloat64 (kfloat64& n) { +void +frnetorderstream::readFloat64 (kfloat64& n) { read (reinterpret_cast(&n), 8); #ifdef WORDS_BIGENDIAN SwapBytes8 (&n); #endif - return (*this); }