util/NumberParser: add ParseFloat()

This commit is contained in:
Max Kellermann 2013-10-26 13:11:32 +02:00
parent ade66e7ece
commit 3ac7de7a22

View File

@ -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