From 7f476cd2598b7363a97e484b51a7ea875d9128e7 Mon Sep 17 00:00:00 2001 From: Anders Dalvander Date: Sat, 23 Nov 2024 09:04:46 +0100 Subject: [PATCH] fix clang unused-function warning --- include/fast_float/float_common.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 0c69029..a9a31fb 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -738,9 +738,8 @@ template static constexpr uint64_t int_cmp_zeros() { template static constexpr int int_cmp_len() { return sizeof(uint64_t) / sizeof(UC); } -template static constexpr UC const *str_const_nan() { - return nullptr; -} + +template constexpr UC const *str_const_nan(); template <> constexpr char const *str_const_nan() { return "nan"; } template <> constexpr wchar_t const *str_const_nan() { return L"nan"; } template <> constexpr char16_t const *str_const_nan() { @@ -749,9 +748,8 @@ template <> constexpr char16_t const *str_const_nan() { template <> constexpr char32_t const *str_const_nan() { return U"nan"; } -template static constexpr UC const *str_const_inf() { - return nullptr; -} + +template constexpr UC const *str_const_inf(); template <> constexpr char const *str_const_inf() { return "infinity"; } template <> constexpr wchar_t const *str_const_inf() { return L"infinity";