From 5223f552c886e605fef9a89f95df89878f305808 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 4 Jun 2021 20:29:54 -0700 Subject: [PATCH] Remove FMT_ALWAYS_INLINE --- include/fmt/format-inl.h | 11 +++++------ include/fmt/format.h | 8 -------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 16fc5f5d..ab03e3bf 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -637,8 +637,8 @@ inline uint64_t power_of_10_64(int exp) { // error: the size of the region (lower, upper) outside of which numbers // definitely do not round to value (Delta in Grisu3). template -FMT_ALWAYS_INLINE digits::result grisu_gen_digits(fp value, uint64_t error, - int& exp, Handler& handler) { +FMT_INLINE digits::result grisu_gen_digits(fp value, uint64_t error, int& exp, + Handler& handler) { const fp one(1ULL << -value.e, value.e); // The integral part of scaled value (p1 in Grisu) = value / one. It cannot be // zero because it contains a product of two 64-bit numbers with MSB set (due @@ -1916,7 +1916,7 @@ bool is_center_integer(typename float_info::carrier_uint two_f, int exponent, } // Remove trailing zeros from n and return the number of zeros removed (float) -FMT_ALWAYS_INLINE int remove_trailing_zeros(uint32_t& n) FMT_NOEXCEPT { +FMT_INLINE int remove_trailing_zeros(uint32_t& n) FMT_NOEXCEPT { #ifdef FMT_BUILTIN_CTZ int t = FMT_BUILTIN_CTZ(n); #else @@ -1944,7 +1944,7 @@ FMT_ALWAYS_INLINE int remove_trailing_zeros(uint32_t& n) FMT_NOEXCEPT { } // Removes trailing zeros and returns the number of zeros removed (double) -FMT_ALWAYS_INLINE int remove_trailing_zeros(uint64_t& n) FMT_NOEXCEPT { +FMT_INLINE int remove_trailing_zeros(uint64_t& n) FMT_NOEXCEPT { #ifdef FMT_BUILTIN_CTZLL int t = FMT_BUILTIN_CTZLL(n); #else @@ -2030,8 +2030,7 @@ FMT_ALWAYS_INLINE int remove_trailing_zeros(uint64_t& n) FMT_NOEXCEPT { // The main algorithm for shorter interval case template -FMT_ALWAYS_INLINE decimal_fp shorter_interval_case(int exponent) - FMT_NOEXCEPT { +FMT_INLINE decimal_fp shorter_interval_case(int exponent) FMT_NOEXCEPT { decimal_fp ret_value; // Compute k and beta const int minus_k = floor_log10_pow2_minus_log10_4_over_3(exponent); diff --git a/include/fmt/format.h b/include/fmt/format.h index 61534de9..dbcbb0dd 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -991,14 +991,6 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int { template <> auto count_digits<4>(detail::fallback_uintptr n) -> int; -#if FMT_GCC_VERSION || FMT_CLANG_VERSION -# define FMT_ALWAYS_INLINE inline __attribute__((always_inline)) -#elif FMT_MSC_VER -# define FMT_ALWAYS_INLINE __forceinline -#else -# define FMT_ALWAYS_INLINE inline -#endif - #ifdef FMT_BUILTIN_CLZ // Optional version of count_digits for better performance on 32-bit platforms. FMT_CONSTEXPR20 inline auto count_digits(uint32_t n) -> int {