Use strtod in config_get_float regardless.

This commit is contained in:
Themaister 2012-11-26 22:14:07 +01:00
parent 2da456d007
commit 651683becc

View File

@ -411,12 +411,8 @@ bool config_get_float(config_file_t *conf, const char *key, float *in)
{ {
if (strcmp(key, list->key) == 0) if (strcmp(key, list->key) == 0)
{ {
#ifdef __cplusplus // strtof() is C99/POSIX. Just use the more portable kind.
// strtof() is C99/POSIX.
*in = (float)strtod(list->value, NULL); *in = (float)strtod(list->value, NULL);
#else
*in = strtof(list->value, NULL);
#endif
return true; return true;
} }
list = list->next; list = list->next;