src/hb-common.cc: Fix build on older Visual Studio
Visual Studio only supported strtof() from Visual Studio 2013 onwards, so use strtod() instead to do the operation, which should do the same thing, sans going to a double, not a float.
This commit is contained in:
parent
b90fb83ea6
commit
539571c1a9
|
@ -667,7 +667,11 @@ parse_float (const char **pp, const char *end, float *pv)
|
||||||
float v;
|
float v;
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
#if defined (_MSC_VER) && (_MSC_VER < 1800)
|
||||||
|
v = strtod (p, &pend);
|
||||||
|
#else
|
||||||
v = strtof (p, &pend);
|
v = strtof (p, &pend);
|
||||||
|
#endif
|
||||||
if (errno || p == pend)
|
if (errno || p == pend)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue