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

Unified Diff: chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm

Issue 10825447: chrome/browser should build on the x86_64 architecture (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 4 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
Index: chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
index f8024c2e91fb92ea03e564e2c3bec6ebeda42376..2b9761143e491e734ca306eca817afce6e85a7e6 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
@@ -261,7 +261,8 @@ const CGFloat kLabelInset = 49.0;
// Cap the index. We don't wrap around to match the behavior of Mac menus.
new_index =
- std::min(std::max(0, new_index), static_cast<NSInteger>(count - 1));
+ std::min(std::max(static_cast<NSInteger>(0), new_index),
+ static_cast<NSInteger>(count - 1));
[self highlightItem:[items_ objectAtIndex:new_index]];
}

Powered by Google App Engine
This is Rietveld 408576698