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
commit 10d0cac73c
Notes: sideshowbarker 2024-07-18 01:08:14 +09:00

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;