aboutsummaryrefslogtreecommitdiffstats
path: root/common/alnumeric.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-06 01:48:58 -0800
committerChris Robinson <[email protected]>2022-12-06 01:48:58 -0800
commit4d757068c4784a18026089fd812949703bd9470a (patch)
tree1a1c2f819d14acc7a32cc26f10ffa1227c72b744 /common/alnumeric.h
parent25a6814cf36bee82b24cb1b5f40769e66c327db4 (diff)
Avoid using a macro to wrap standard attributes
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 b617b363..13e61645 100644
--- a/common/alnumeric.h
+++ b/common/alnumeric.h
@@ -161,11 +161,11 @@ inline int float2int(float f) noexcept
shift = ((conv.i>>23)&0xff) - (127+23);
/* Over/underflow */
- if(shift >= 31 || shift < -23) [[alunlikely]]
+ if(shift >= 31 || shift < -23) [[unlikely]]
return 0;
mant = (conv.i&0x7fffff) | 0x800000;
- if(shift < 0) [[allikely]]
+ if(shift < 0) [[likely]]
return (mant >> -shift) * sign;
return (mant << shift) * sign;
@@ -198,11 +198,11 @@ inline int double2int(double d) noexcept
shift = ((conv.i64 >> 52) & 0x7ff) - (1023 + 52);
/* Over/underflow */
- if(shift >= 63 || shift < -52) [[alunlikely]]
+ if(shift >= 63 || shift < -52) [[unlikely]]
return 0;
mant = (conv.i64 & 0xfffffffffffff_i64) | 0x10000000000000_i64;
- if(shift < 0) [[allikely]]
+ if(shift < 0) [[likely]]
return (int)(mant >> -shift) * sign;
return (int)(mant << shift) * sign;
@@ -251,7 +251,7 @@ inline float fast_roundf(float f) noexcept
sign = (conv.i>>31)&0x01;
expo = (conv.i>>23)&0xff;
- if(expo >= 150/*+23*/) [[alunlikely]]
+ 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