byte swapping
All checks were successful
Linux arm64 / Build (push) Successful in 15s

This commit is contained in:
2025-06-26 14:43:27 +02:00
parent 10b49b34dd
commit 073872df94
11 changed files with 168 additions and 178 deletions

View File

@@ -4,8 +4,6 @@
namespace sp {
bool IsSystemBigEndian();
/**
* \brief Serialize value to (network byte order) big endian
*/
@@ -36,19 +34,4 @@ void FromNetwork<std::uint32_t>(std::uint32_t& value);
template <>
void FromNetwork<std::uint64_t>(std::uint64_t& value);
/**
* \brief Swap bytes if the value is any kind of integer
*/
template <typename T>
void TrySwapBytes(T& value) {}
template <>
void TrySwapBytes<std::uint16_t>(std::uint16_t& value);
template <>
void TrySwapBytes<std::uint32_t>(std::uint32_t& value);
template <>
void TrySwapBytes<std::uint64_t>(std::uint64_t& value);
} // namespace sp