summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 10:15:10 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 10:15:10 +0000
commit9994b662152d6fc3519e12aeda574a3960c576dd (patch)
tree2850e4926ba5826b4da37a3ca7ba372509266244 /chrome
parent7b4c0d60619378da4b60952ff29414b6bc3a1a37 (diff)
downloadchromium_src-9994b662152d6fc3519e12aeda574a3960c576dd.zip
chromium_src-9994b662152d6fc3519e12aeda574a3960c576dd.tar.gz
chromium_src-9994b662152d6fc3519e12aeda574a3960c576dd.tar.bz2
Remove two unneeded uses of std::floor in the GTK tab code.
- <cmath> was not included, breaking some builds - one floor was used without the std:: prefix These floor calls should have been redundant, the result was assigned to an int, which will cause the same truncation anyway. Pointed out by Hironori Bono and Craig Schlenter. Review URL: http://codereview.chromium.org/60088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index 456ac81..33b6ad1 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -26,7 +26,7 @@ const int kTabHOffset = -16;
SkBitmap* background = NULL;
inline int Round(double x) {
- return static_cast<int>(floor(x + 0.5));
+ return static_cast<int>(x + 0.5);
}
// widget->allocation is not guaranteed to be set. After window creation,
@@ -430,8 +430,7 @@ gboolean TabStripGtk::OnMotionNotify(GtkWidget* widget, GdkEventMotion* event,
gfx::Point coord(event->x, event->y);
// Get a rough estimate for which tab the mouse is over.
- int index = std::floor(
- event->x / (tabstrip->current_unselected_width_ + kTabHOffset));
+ int index = event->x / (tabstrip->current_unselected_width_ + kTabHOffset);
if (index >= tabstrip->model_->count()) {
if (old_hover_index != -1) {