commit | a5ba6f9bb7665040045dc0f8087407096630ad7b | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Fri Feb 08 02:57:28 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 08 02:57:28 2019 |
tree | 5bcb6ef22cc0a049258c41f8840fb312b45d89a9 | |
parent | 26efe9986211956e212cb415e1b4d1a2b0632a1f [diff] |
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}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .