diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 20:03:02 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 20:03:02 +0000 |
commit | 129661ead16de9acb631ded92b65ca80ecd8b8f9 (patch) | |
tree | c9c52c82124a22d50cad517192ce007a24c8911b /views/controls | |
parent | cc8f2810b5a7dfeb7d4310f50be9f527056aa313 (diff) | |
download | chromium_src-129661ead16de9acb631ded92b65ca80ecd8b8f9.zip chromium_src-129661ead16de9acb631ded92b65ca80ecd8b8f9.tar.gz chromium_src-129661ead16de9acb631ded92b65ca80ecd8b8f9.tar.bz2 |
views: remove some unnecessary static_cast<int>.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/429004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/scrollbar/bitmap_scroll_bar.cc | 7 | ||||
-rw-r--r-- | views/controls/table/group_table_view.cc | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc index 98a95ff..cba747a 100644 --- a/views/controls/scrollbar/bitmap_scroll_bar.cc +++ b/views/controls/scrollbar/bitmap_scroll_bar.cc @@ -107,9 +107,8 @@ class BitmapScrollBarThumb : public View { // Make sure the thumb is never sized smaller than its minimum possible // display size. gfx::Size prefsize = GetPreferredSize(); - size = std::max(size, - static_cast<int>(scroll_bar_->IsHorizontal() ? - prefsize.width() : prefsize.height())); + size = std::max(size, scroll_bar_->IsHorizontal() ? prefsize.width() : + prefsize.height()); gfx::Rect thumb_bounds = bounds(); if (scroll_bar_->IsHorizontal()) { thumb_bounds.set_width(size); @@ -305,7 +304,7 @@ gfx::Rect BitmapScrollBar::GetTrackBounds() const { if (!show_scroll_buttons_) prefsize.set_width(0); int new_width = - std::max(0, static_cast<int>(width() - (prefsize.width() * 2))); + std::max(0, width() - (prefsize.width() * 2)); gfx::Rect track_bounds(prefsize.width(), 0, new_width, prefsize.height()); return track_bounds; } diff --git a/views/controls/table/group_table_view.cc b/views/controls/table/group_table_view.cc index a70515d..84573a9 100644 --- a/views/controls/table/group_table_view.cc +++ b/views/controls/table/group_table_view.cc @@ -174,13 +174,13 @@ void GroupTableView::PostPaint(int model_row, int column, bool selected, // We always paint a vertical line at the end of the last cell. HPEN hPen = CreatePen(PS_SOLID, kSeparatorLineThickness, kSeparatorLineColor); HPEN hPenOld = (HPEN) SelectObject(hdc, hPen); - int x = static_cast<int>(bounds.right() - kSeparatorLineThickness); + int x = bounds.right() - kSeparatorLineThickness; MoveToEx(hdc, x, bounds.y(), NULL); LineTo(hdc, x, bounds.bottom()); // We paint a separator line after the last item of a group. if (model_row == (group_range.start + group_range.length - 1)) { - int y = static_cast<int>(bounds.bottom() - kSeparatorLineThickness); + int y = bounds.bottom() - kSeparatorLineThickness; MoveToEx(hdc, 0, y, NULL); LineTo(hdc, bounds.width(), y); } |