mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-04-20 10:16:48 +00:00
Lot's of small niggles corrected across the EightBit libraries
This commit is contained in:
@@ -71,18 +71,18 @@ inline int EightBit::findFirstSet(const unsigned long value) noexcept {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
# define ASSUME(x) __assume(x);
|
||||
# define ASSUME(x) __assume(x);
|
||||
|
||||
# define LIKELY(x) (x)
|
||||
# define LIKELY(x) (x)
|
||||
# define UNLIKELY(x) (x)
|
||||
|
||||
# define UNREACHABLE { ASSUME(0); assert(false && "unreachable"); }
|
||||
|
||||
#elif defined(__GNUG__)
|
||||
|
||||
# define ASSUME(x) { if (!x) __builtin_unreachable(); }
|
||||
# define ASSUME(x) { if (!x) __builtin_unreachable(); }
|
||||
|
||||
# define LIKELY(x) __builtin_expect(!!(x), 1)
|
||||
# define LIKELY(x) __builtin_expect(!!(x), 1)
|
||||
# define UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||
|
||||
# define UNREACHABLE __builtin_unreachable();
|
||||
@@ -91,7 +91,7 @@ inline int EightBit::findFirstSet(const unsigned long value) noexcept {
|
||||
|
||||
# define ASSUME(x) assert(x);
|
||||
|
||||
# define LIKELY(x) (x)
|
||||
# define LIKELY(x) (x)
|
||||
# define UNLIKELY(x) (x)
|
||||
|
||||
# define UNREACHABLE ASSUME(0)
|
||||
|
||||
Reference in New Issue
Block a user