aboutsummaryrefslogtreecommitdiffstats
path: root/common/alnumeric.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/alnumeric.h')
-rw-r--r--common/alnumeric.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/alnumeric.h b/common/alnumeric.h
index a426763f..d6919e40 100644
--- a/common/alnumeric.h
+++ b/common/alnumeric.h
@@ -170,11 +170,11 @@ inline int float2int(float f) noexcept
shift = ((conv.i>>23)&0xff) - (127+23);
/* Over/underflow */
- if(shift >= 31 || shift < -23) [[unlikely]]
+ if(shift >= 31 || shift < -23) UNLIKELY
return 0;
mant = (conv.i&0x7fffff) | 0x800000;
- if(shift < 0) [[likely]]
+ if(shift < 0) LIKELY
return (mant >> -shift) * sign;
return (mant << shift) * sign;
@@ -207,11 +207,11 @@ inline int double2int(double d) noexcept
shift = ((conv.i64 >> 52) & 0x7ff) - (1023 + 52);
/* Over/underflow */
- if(shift >= 63 || shift < -52) [[unlikely]]
+ if(shift >= 63 || shift < -52) UNLIKELY
return 0;
mant = (conv.i64 & 0xfffffffffffff_i64) | 0x10000000000000_i64;
- if(shift < 0) [[likely]]
+ if(shift < 0) LIKELY
return (int)(mant >> -shift) * sign;
return (int)(mant << shift) * sign;
@@ -260,7 +260,7 @@ inline float fast_roundf(float f) noexcept
sign = (conv.i>>31)&0x01;
expo = (conv.i>>23)&0xff;
- if(expo >= 150/*+23*/) [[unlikely]]
+ if(expo >= 150/*+23*/) UNLIKELY
{
/* An exponent (base-2) of 23 or higher is incapable of sub-integral
* precision, so it's already an integral value. We don't need to worry