mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
AK: Use builtin versions of llrint{,l,f}
This fixes the build on M1 Macs.
This commit is contained in:
parent
fbc1448eab
commit
6ea89c35fe
1 changed files with 3 additions and 3 deletions
|
@ -577,11 +577,11 @@ ALWAYS_INLINE I round_to(P value)
|
||||||
return static_cast<I>(ret);
|
return static_cast<I>(ret);
|
||||||
#else
|
#else
|
||||||
if constexpr (IsSame<P, long double>)
|
if constexpr (IsSame<P, long double>)
|
||||||
return static_cast<I>(llrintl(value));
|
return static_cast<I>(__builtin_llrintl(value));
|
||||||
if constexpr (IsSame<P, double>)
|
if constexpr (IsSame<P, double>)
|
||||||
return static_cast<I>(llrint(value));
|
return static_cast<I>(__builtin_llrint(value));
|
||||||
if constexpr (IsSame<P, float>)
|
if constexpr (IsSame<P, float>)
|
||||||
return static_cast<I>(llrintf(value));
|
return static_cast<I>(__builtin_llrintf(value));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue