| 182 | /// otherwise returns x unchanged. |
| 183 | template<typename T> |
| 184 | inline T asBigEndian( const T &x ) |
| 185 | { |
| 186 | if( littleEndian() ) |
| 187 | { |
| 188 | return reverseBytes( x ); |
| 189 | } |
| 190 | else |
| 191 | { |
| 192 | return x; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | } |
| 197 |
no test coverage detected