diff --git a/src/ox/std/byteswap.hpp b/src/ox/std/byteswap.hpp index ab2d05d30..494d00a6f 100644 --- a/src/ox/std/byteswap.hpp +++ b/src/ox/std/byteswap.hpp @@ -63,6 +63,16 @@ constexpr T conditionalByteSwap(T i) noexcept { } } +template +constexpr T toLittleEndian(T i) noexcept { + return conditionalByteSwap(i); +} + +template +constexpr T toBigEndian(T i) noexcept { + return conditionalByteSwap(i); +} + template class OX_PACKED ByteSwapInteger { private: