| 166 | /// otherwise returns x unchanged. |
| 167 | template<typename T> |
| 168 | inline T asLittleEndian( const T &x ) |
| 169 | { |
| 170 | if( bigEndian() ) |
| 171 | { |
| 172 | return reverseBytes( x ); |
| 173 | } |
| 174 | else |
| 175 | { |
| 176 | return x; |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | /// If running on a little endian platform, |
| 181 | /// returns a copy of x with reversed bytes, |
nothing calls this directly
no test coverage detected