Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 292853002: linux_aura: Fix abs() warning found by new clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index 27302163220f9ca8aa9ce1d37ebd2fa695596c78..e12b6072fd6cd2b33b26d1c05b16be809865213f 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -246,9 +246,12 @@ void PickButtonTintFromColors(const GdkColor& accent_gdk_color,
// 125] will tint green instead of gray). Slight differences (+/-10 (4%) to
// all color components) should be interpreted as this color being gray and
// we should switch into a special grayscale mode.
- int rb_diff = abs(SkColorGetR(accent_color) - SkColorGetB(accent_color));
- int rg_diff = abs(SkColorGetR(accent_color) - SkColorGetG(accent_color));
- int bg_diff = abs(SkColorGetB(accent_color) - SkColorGetG(accent_color));
+ int rb_diff = abs(static_cast<int>(SkColorGetR(accent_color)) -
+ static_cast<int>(SkColorGetB(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) {
// Our accent is white/gray/black. Only the luminance of the accent color
// matters.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698