mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
clang didn't like constexpr is_big/little_endian checks
This commit is contained in:
parent
83edcb06c2
commit
cbb194e516
|
@ -75,10 +75,10 @@ namespace Blah
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr bool is_big_endian() { return (*((short*)"AB") == 0x4243); }
|
inline bool is_big_endian() { return (*((short*)"AB") == 0x4243); }
|
||||||
constexpr bool is_little_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
|
return
|
||||||
(endian == Endian::Little && is_little_endian()) ||
|
(endian == Endian::Little && is_little_endian()) ||
|
||||||
|
|
Loading…
Reference in New Issue
Block a user