From 1fe58660300b08fe96b5f7e0ed1a771a13009d40 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Tue, 16 Jul 2024 13:41:21 +0200 Subject: [PATCH] fix: remove trailing return types --- include/yaml-cpp/fp_to_string.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/yaml-cpp/fp_to_string.h b/include/yaml-cpp/fp_to_string.h index 2ababd5f7..380c01ff1 100644 --- a/include/yaml-cpp/fp_to_string.h +++ b/include/yaml-cpp/fp_to_string.h @@ -32,7 +32,7 @@ namespace fp_formatting { * assert(buffer[1] == '2'); * assert(buffer[2] == '3'); */ -inline auto ConvertToChars(char* begin, char* end, size_t value, int width=1) -> int { +inline int ConvertToChars(char* begin, char* end, size_t value, int width=1) { assert(width >= 1); assert(end >= begin); // end must be after begin assert(end-begin >= width); // Buffer must be large enough @@ -62,7 +62,7 @@ inline auto ConvertToChars(char* begin, char* end, size_t value, int width=1) -> * converts a value 'v' to a string. Uses dragonbox for formatting. */ template -auto FpToString(T v, int precision = 0) -> std::string { +std::string FpToString(T v, int precision = 0) { // assert(precision > 0); // hardcoded constant, at which exponent should switch to a scientific notation int const lowerExponentThreshold = -5; @@ -184,18 +184,18 @@ auto FpToString(T v, int precision = 0) -> std::string { } } -inline auto FpToString(float v, size_t precision = 0) -> std::string { +inline std::string FpToString(float v, size_t precision = 0) { return detail::fp_formatting::FpToString(v, precision); } -inline auto FpToString(double v, size_t precision = 0) -> std::string { +inline std::string FpToString(double v, size_t precision = 0) { return detail::fp_formatting::FpToString(v, precision); } /** * dragonbox only works for floats/doubles not long double */ -inline auto FpToString(long double v, size_t precision = std::numeric_limits::max_digits10) -> std::string { +inline std::string FpToString(long double v, size_t precision = std::numeric_limits::max_digits10) { std::stringstream ss; ss.imbue(std::locale("C")); ss.precision(precision);