diff --git a/include/osg/Endian b/include/osg/Endian index 3e3934f7b..b35155894 100644 --- a/include/osg/Endian +++ b/include/osg/Endian @@ -80,6 +80,9 @@ inline void swapBytes16( char* in ) std::swap(in[7],in[8]); } +template +void swapBytes(T& t) { swapBytes(reinterpret_cast(&t), sizeof(T)); } + } #endif