commit | 1b6805b7d87284000f4ed540fee48f721ec48729 | [log] [tgz] |
---|---|---|
author | Cindy Liu <hcindyl@google.com> | Sat Jan 22 08:04:06 2022 -0800 |
committer | Cindy Liu <hcindyl@google.com> | Sat Jan 22 08:04:06 2022 -0800 |
tree | 34bc32cd2b59fb7e66399238fefd82cf6e214f8b | |
parent | 97f1f2d14842734eff89d00fcd2268d39215c93b [diff] |
pw_string: Remove implicit double promotions Cherry-pick from https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/67422 Change-Id: I0c92d22e8941f4802abf574a794a989f9b4436a1
diff --git a/pw_string/type_to_string.cc b/pw_string/type_to_string.cc index 3475b12..ab58a52 100644 --- a/pw_string/type_to_string.cc +++ b/pw_string/type_to_string.cc
@@ -153,7 +153,7 @@ if (std::isfinite(value) && std::abs(value) < static_cast<float>(std::numeric_limits<int64_t>::max())) { - return IntToString<int64_t>(::round(value), buffer); + return IntToString<int64_t>(roundf(value), buffer); } // Otherwise, print inf or NaN, if they fit.