From 3ac7de7a223a2d29bc96ab850d37318c5435fd6d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Oct 2013 13:11:32 +0200 Subject: util/NumberParser: add ParseFloat() --- src/util/NumberParser.hxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/util') diff --git a/src/util/NumberParser.hxx b/src/util/NumberParser.hxx index df55bb7ff..b4efdeaae 100644 --- a/src/util/NumberParser.hxx +++ b/src/util/NumberParser.hxx @@ -75,4 +75,10 @@ ParseDouble(const char *p, char **endptr=nullptr) return (double)strtod(p, endptr); } +static inline float +ParseFloat(const char *p, char **endptr=nullptr) +{ + return (float)ParseDouble(p, endptr); +} + #endif -- cgit v1.2.3