1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

AK: Use capitalized literal suffixes for AK::abs() overloads

Using `l` for long double causes a clang-tidy warning, so use all caps
suffixes for all of the AK::abs() overloads for consistency. Also, avoid
leaking the internal __DEFINE_GENERIC_ABS macro.
This commit is contained in:
Andrew Kaster 2021-11-06 11:26:02 -06:00 committed by Andreas Kling
parent e982253c33
commit 10d0cac73c

View file

@ -146,14 +146,16 @@ constexpr bool is_constant_evaluated()
} }
__DEFINE_GENERIC_ABS(int, 0, abs); __DEFINE_GENERIC_ABS(int, 0, abs);
__DEFINE_GENERIC_ABS(long, 0l, labs); __DEFINE_GENERIC_ABS(long, 0L, labs);
__DEFINE_GENERIC_ABS(long long, 0ll, llabs); __DEFINE_GENERIC_ABS(long long, 0LL, llabs);
#ifndef KERNEL #ifndef KERNEL
__DEFINE_GENERIC_ABS(float, 0.0f, fabsf); __DEFINE_GENERIC_ABS(float, 0.0F, fabsf);
__DEFINE_GENERIC_ABS(double, 0.0, fabs); __DEFINE_GENERIC_ABS(double, 0.0, fabs);
__DEFINE_GENERIC_ABS(long double, 0.0l, fabsl); __DEFINE_GENERIC_ABS(long double, 0.0L, fabsl);
#endif #endif
#undef __DEFINE_GENERIC_ABS
} }
using AK::array_size; using AK::array_size;