Commit 16e8017a authored by erg@chromium.org's avatar erg@chromium.org

linux_aura: Fix abs() warning found by new clang.

BUG=374651

Review URL: https://codereview.chromium.org/292853002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271577 0039d316-1c4b-4281-b951-d872f2087c98
parent c3ba35bf
...@@ -246,9 +246,12 @@ void PickButtonTintFromColors(const GdkColor& accent_gdk_color, ...@@ -246,9 +246,12 @@ void PickButtonTintFromColors(const GdkColor& accent_gdk_color,
// 125] will tint green instead of gray). Slight differences (+/-10 (4%) to // 125] will tint green instead of gray). Slight differences (+/-10 (4%) to
// all color components) should be interpreted as this color being gray and // all color components) should be interpreted as this color being gray and
// we should switch into a special grayscale mode. // we should switch into a special grayscale mode.
int rb_diff = abs(SkColorGetR(accent_color) - SkColorGetB(accent_color)); int rb_diff = abs(static_cast<int>(SkColorGetR(accent_color)) -
int rg_diff = abs(SkColorGetR(accent_color) - SkColorGetG(accent_color)); static_cast<int>(SkColorGetB(accent_color)));
int bg_diff = abs(SkColorGetB(accent_color) - SkColorGetG(accent_color)); int rg_diff = abs(static_cast<int>(SkColorGetR(accent_color)) -
static_cast<int>(SkColorGetG(accent_color)));
int bg_diff = abs(static_cast<int>(SkColorGetB(accent_color)) -
static_cast<int>(SkColorGetG(accent_color)));
if (rb_diff < 10 && rg_diff < 10 && bg_diff < 10) { if (rb_diff < 10 && rg_diff < 10 && bg_diff < 10) {
// Our accent is white/gray/black. Only the luminance of the accent color // Our accent is white/gray/black. Only the luminance of the accent color
// matters. // matters.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment