diff options
author | Max Kellermann <max@duempel.org> | 2013-10-26 13:11:32 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-26 13:49:15 +0200 |
commit | 3ac7de7a223a2d29bc96ab850d37318c5435fd6d (patch) | |
tree | d2f8409593b86172c84a2e0c36e4b712511d1b33 /src/util/NumberParser.hxx | |
parent | ade66e7eceb56a6a93423ab3263c9f11a9e904df (diff) | |
download | mpd-3ac7de7a223a2d29bc96ab850d37318c5435fd6d.tar.gz mpd-3ac7de7a223a2d29bc96ab850d37318c5435fd6d.tar.xz mpd-3ac7de7a223a2d29bc96ab850d37318c5435fd6d.zip |
util/NumberParser: add ParseFloat()
Diffstat (limited to '')
-rw-r--r-- | src/util/NumberParser.hxx | 6 |
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 |