Skip to content

Commit 1fe5866

Browse files
committed
fix: remove trailing return types
1 parent 25fc7a7 commit 1fe5866

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/yaml-cpp/fp_to_string.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace fp_formatting {
3232
* assert(buffer[1] == '2');
3333
* assert(buffer[2] == '3');
3434
*/
35-
inline auto ConvertToChars(char* begin, char* end, size_t value, int width=1) -> int {
35+
inline int ConvertToChars(char* begin, char* end, size_t value, int width=1) {
3636
assert(width >= 1);
3737
assert(end >= begin); // end must be after begin
3838
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) ->
6262
* converts a value 'v' to a string. Uses dragonbox for formatting.
6363
*/
6464
template <typename T>
65-
auto FpToString(T v, int precision = 0) -> std::string {
65+
std::string FpToString(T v, int precision = 0) {
6666
// assert(precision > 0);
6767
// hardcoded constant, at which exponent should switch to a scientific notation
6868
int const lowerExponentThreshold = -5;
@@ -184,18 +184,18 @@ auto FpToString(T v, int precision = 0) -> std::string {
184184
}
185185
}
186186

187-
inline auto FpToString(float v, size_t precision = 0) -> std::string {
187+
inline std::string FpToString(float v, size_t precision = 0) {
188188
return detail::fp_formatting::FpToString(v, precision);
189189
}
190190

191-
inline auto FpToString(double v, size_t precision = 0) -> std::string {
191+
inline std::string FpToString(double v, size_t precision = 0) {
192192
return detail::fp_formatting::FpToString(v, precision);
193193
}
194194

195195
/**
196196
* dragonbox only works for floats/doubles not long double
197197
*/
198-
inline auto FpToString(long double v, size_t precision = std::numeric_limits<long double>::max_digits10) -> std::string {
198+
inline std::string FpToString(long double v, size_t precision = std::numeric_limits<long double>::max_digits10) {
199199
std::stringstream ss;
200200
ss.imbue(std::locale("C"));
201201
ss.precision(precision);

0 commit comments

Comments
 (0)