color_utils: Use std::sqrt() instead of std::sqrtf()
This fixes the build with libstdc++: ../../ui/gfx/color_utils.cc: In function ‘SkColor color_utils::SetDarkestColorForTesting(SkColor)’: ../../ui/gfx/color_utils.cc:434:12: error: ‘sqrtf’ is not a member of ‘std’ std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f; ^~~~~ ../../ui/gfx/color_utils.cc:434:12: note: suggested alternative: ‘sqrt’ std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f; ^~~~~ sqrt sqrtf() is not formally part of C++14 as far as I can see even though libc++ has it in <cmath>. Additionally, we're only dealing with floats in all parts of the expression above, so using the float sqrt() overload should be harmless anyway. Bug: 819294 Change-Id: If6c7bf31819df97a761e6963def6d6506154c34d Reviewed-on: https://chromium-review.googlesource.com/c/1458193 Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by:Peter Kasting <pkasting@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#630140}
Showing
Please register or sign in to comment