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

Side by Side Diff: ui/views/controls/table/table_utils.cc

Issue 1543173002: Switch to standard integer types in ui/views/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/table/table_utils.h" 5 #include "ui/views/controls/table/table_utils.h"
6 6
7 #include <stddef.h>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
9 #include "ui/gfx/font_list.h" 11 #include "ui/gfx/font_list.h"
10 #include "ui/gfx/text_utils.h" 12 #include "ui/gfx/text_utils.h"
11 #include "ui/views/controls/table/table_view.h" 13 #include "ui/views/controls/table/table_view.h"
12 14
13 namespace views { 15 namespace views {
14 16
15 const int kUnspecifiedColumnWidth = 90; 17 const int kUnspecifiedColumnWidth = 90;
16 18
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const std::vector<TableView::VisibleColumn>& columns( 110 const std::vector<TableView::VisibleColumn>& columns(
109 table->visible_columns()); 111 table->visible_columns());
110 for (size_t i = 0; i < columns.size(); ++i) { 112 for (size_t i = 0; i < columns.size(); ++i) {
111 if (x <= columns[i].x + columns[i].width) 113 if (x <= columns[i].x + columns[i].width)
112 return static_cast<int>(i); 114 return static_cast<int>(i);
113 } 115 }
114 return static_cast<int>(columns.size()) - 1; 116 return static_cast<int>(columns.size()) - 1;
115 } 117 }
116 118
117 } // namespace views 119 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698