aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-26 13:11:32 +0200
committerMax Kellermann <max@duempel.org>2013-10-26 13:49:15 +0200
commit3ac7de7a223a2d29bc96ab850d37318c5435fd6d (patch)
treed2f8409593b86172c84a2e0c36e4b712511d1b33
parentade66e7eceb56a6a93423ab3263c9f11a9e904df (diff)
downloadmpd-3ac7de7a223a2d29bc96ab850d37318c5435fd6d.tar.gz
mpd-3ac7de7a223a2d29bc96ab850d37318c5435fd6d.tar.xz
mpd-3ac7de7a223a2d29bc96ab850d37318c5435fd6d.zip
util/NumberParser: add ParseFloat()
-rw-r--r--src/util/NumberParser.hxx6
1 files changed, 6 insertions, 0 deletions
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