From 090a2940179ba19788035677433e8af0ab5bee42 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 9 Apr 2024 01:13:28 +0300 Subject: [PATCH] BAN: Add {little,big}_endian_to_host These just call host_to_{little,big}_endian but are more verbose and cleaner. --- BAN/include/BAN/Endianness.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BAN/include/BAN/Endianness.h b/BAN/include/BAN/Endianness.h index 061c2980..97a2d385 100644 --- a/BAN/include/BAN/Endianness.h +++ b/BAN/include/BAN/Endianness.h @@ -45,6 +45,12 @@ namespace BAN #endif } + template + constexpr T little_endian_to_host(T value) + { + return host_to_little_endian(value); + } + template constexpr T host_to_big_endian(T value) { @@ -55,6 +61,12 @@ namespace BAN #endif } + template + constexpr T big_endian_to_host(T value) + { + return host_to_big_endian(value); + } + template struct LittleEndian {