From 0b93fce923518f7e1d2b50aecd1b1bd91c3e1794 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 29 Sep 2023 19:38:07 +0300 Subject: [PATCH] BAN: Remove endianness functions from Math There is now a Endianness.h for these. The functions were super slow. --- BAN/include/BAN/Math.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/BAN/include/BAN/Math.h b/BAN/include/BAN/Math.h index a5eeb44b7d..91a7a558df 100644 --- a/BAN/include/BAN/Math.h +++ b/BAN/include/BAN/Math.h @@ -102,22 +102,4 @@ namespace BAN::Math return result; } - template - inline constexpr T little_endian_to_host(const uint8_t* bytes) - { - T result = 0; - for (size_t i = 0; i < sizeof(T); i++) - result |= (T)bytes[i] << (i * 8); - return result; - } - - template - inline constexpr T big_endian_to_host(const uint8_t* bytes) - { - T result = 0; - for (size_t i = 0; i < sizeof(T); i++) - result |= (T)bytes[i] << (8 * (sizeof(T) - i - 1)); - return result; - } - } \ No newline at end of file