| 31 | |
| 32 | template<typename T> |
| 33 | inline void swapByteOrder(T*v) |
| 34 | { |
| 35 | constexpr size_t n = sizeof(T); |
| 36 | uint8_t out[n]; |
| 37 | for (unsigned int c = 0; c < n; c++) |
| 38 | out[c] = reinterpret_cast<uint8_t*>(v)[n - c - 1]; |
| 39 | std::memcpy(v, out, n); |
| 40 | } |
| 41 | |
| 42 | // main |
| 43 | int main(int argc, char **argv) |
no outgoing calls
no test coverage detected