diff --git a/src/tint/writer/float_to_string.cc b/src/tint/writer/float_to_string.cc index b8ae313e58..e0c3260d54 100644 --- a/src/tint/writer/float_to_string.cc +++ b/src/tint/writer/float_to_string.cc @@ -15,7 +15,6 @@ #include "src/tint/writer/float_to_string.h" #include -#include #include #include #include @@ -36,7 +35,7 @@ std::string FloatToString(float f) { // If this string can be parsed without loss of information, use it auto float_equal_no_warning = std::equal_to(); - if (float_equal_no_warning(std::strtof(fixed.str().c_str(), nullptr), f)) { + if (float_equal_no_warning(std::stof(fixed.str()), f)) { auto str = fixed.str(); while (str.length() >= 2 && str[str.size() - 1] == '0' && str[str.size() - 2] != '.') { str.pop_back();