diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-15 08:52:31 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-15 08:52:31 +0000 |
commit | 1a7f42769b898d79643c817cd741d872377fc364 (patch) | |
tree | 0a811d466ba247e8205a9d6c063f112461b536e8 /ui/base/range | |
parent | a48610cce51c396e5667b70bce05a5ad80fbc83c (diff) | |
download | chromium_src-1a7f42769b898d79643c817cd741d872377fc364.zip chromium_src-1a7f42769b898d79643c817cd741d872377fc364.tar.gz chromium_src-1a7f42769b898d79643c817cd741d872377fc364.tar.bz2 |
some fixes and warning disables in ui/ for building on win x64
- Some |int|s that should be |ptrdiff_t|s.
- Icon structures are packing to known size (same signs).
- GetWindowLong needs to be GetWindowLongPtr to work on 32 & 64.
R=ben@chromium.org, jschuh@chromium.org
BUG=167187, 166496
Review URL: https://chromiumcodereview.appspot.com/11889017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/range')
-rw-r--r-- | ui/base/range/range.h | 2 | ||||
-rw-r--r-- | ui/base/range/range_win.cc | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ui/base/range/range.h b/ui/base/range/range.h index dac8d15..b8bf4786 100644 --- a/ui/base/range/range.h +++ b/ui/base/range/range.h @@ -65,7 +65,7 @@ class UI_EXPORT Range { // Returns the absolute value of the length. size_t length() const { - int length = end() - start(); + ptrdiff_t length = end() - start(); return length >= 0 ? length : -length; } diff --git a/ui/base/range/range_win.cc b/ui/base/range/range_win.cc index 0a34958..29178b3 100644 --- a/ui/base/range/range_win.cc +++ b/ui/base/range/range_win.cc @@ -35,10 +35,10 @@ CHARRANGE Range::ToCHARRANGE() const { return r; const LONG kLONGMax = std::numeric_limits<LONG>::max(); - DCHECK_LE(static_cast<LONG>(start()), kLONGMax); - DCHECK_LE(static_cast<LONG>(end()), kLONGMax); - r.cpMin = start(); - r.cpMax = end(); + CHECK_LE(static_cast<LONG>(start()), kLONGMax); + CHECK_LE(static_cast<LONG>(end()), kLONGMax); + r.cpMin = static_cast<LONG>(start()); + r.cpMax = static_cast<LONG>(end()); return r; } |