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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc

Issue 201091: Make implicit float -> int/long conversions explicit.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « base/process_util_linux.cc ('k') | chrome/browser/gtk/back_forward_button_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc (revision 25840)
+++ chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc (working copy)
@@ -370,7 +370,7 @@
gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget,
GdkEventMotion* event) {
// TODO(deanm): Windows has a bunch of complicated logic here.
- size_t line = LineFromY(event->y);
+ size_t line = LineFromY(static_cast<int>(event->y));
// There is both a hovered and selected line, hovered just means your mouse
// is over it, but selected is what's showing in the location edit.
model_->SetHoveredLine(line);
@@ -383,7 +383,7 @@
gboolean AutocompletePopupViewGtk::HandleButtonPress(GtkWidget* widget,
GdkEventButton* event) {
// Very similar to HandleMotion.
- size_t line = LineFromY(event->y);
+ size_t line = LineFromY(static_cast<int>(event->y));
model_->SetHoveredLine(line);
if (event->button == 1)
model_->SetSelectedLine(line, false);
@@ -392,7 +392,7 @@
gboolean AutocompletePopupViewGtk::HandleButtonRelease(GtkWidget* widget,
GdkEventButton* event) {
- size_t line = LineFromY(event->y);
+ size_t line = LineFromY(static_cast<int>(event->y));
switch (event->button) {
case 1: // Left click.
AcceptLine(line, CURRENT_TAB);
@@ -459,7 +459,7 @@
bool has_description = !match.description.empty();
int text_width = window_rect.width() - (kIconAreaWidth + kRightPadding);
int allocated_content_width = has_description ?
- text_width * kContentWidthPercentage : text_width;
+ static_cast<int>(text_width * kContentWidthPercentage) : text_width;
pango_layout_set_width(layout_, allocated_content_width * PANGO_SCALE);
// Note: We force to URL to LTR for all text directions.
« no previous file with comments | « base/process_util_linux.cc ('k') | chrome/browser/gtk/back_forward_button_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698