From cbb194e516040d0cb5dcc00866b44d79a1259d77 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Sat, 12 Feb 2022 23:15:51 -0800 Subject: [PATCH] clang didn't like constexpr is_big/little_endian checks --- include/blah/math/calc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/blah/math/calc.h b/include/blah/math/calc.h index 30328b6..4cce4f1 100644 --- a/include/blah/math/calc.h +++ b/include/blah/math/calc.h @@ -75,10 +75,10 @@ namespace Blah } } - constexpr bool is_big_endian() { return (*((short*)"AB") == 0x4243); } - constexpr bool is_little_endian() { return (*((short*)"AB") != 0x4243); } + inline bool is_big_endian() { return (*((short*)"AB") == 0x4243); } + inline bool is_little_endian() { return (*((short*)"AB") != 0x4243); } - constexpr bool is_endian(const Endian& endian) + inline bool is_endian(const Endian& endian) { return (endian == Endian::Little && is_little_endian()) ||