OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/range/range.h" | 5 #include "ui/base/range/range.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 } | 28 } |
29 } | 29 } |
30 } | 30 } |
31 | 31 |
32 CHARRANGE Range::ToCHARRANGE() const { | 32 CHARRANGE Range::ToCHARRANGE() const { |
33 CHARRANGE r = { -1, -1 }; | 33 CHARRANGE r = { -1, -1 }; |
34 if (!IsValid()) | 34 if (!IsValid()) |
35 return r; | 35 return r; |
36 | 36 |
37 const LONG kLONGMax = std::numeric_limits<LONG>::max(); | 37 const LONG kLONGMax = std::numeric_limits<LONG>::max(); |
38 DCHECK_LE(static_cast<LONG>(start()), kLONGMax); | 38 CHECK_LE(static_cast<LONG>(start()), kLONGMax); |
39 DCHECK_LE(static_cast<LONG>(end()), kLONGMax); | 39 CHECK_LE(static_cast<LONG>(end()), kLONGMax); |
40 r.cpMin = start(); | 40 r.cpMin = static_cast<LONG>(start()); |
41 r.cpMax = end(); | 41 r.cpMax = static_cast<LONG>(end()); |
42 return r; | 42 return r; |
43 } | 43 } |
44 | 44 |
45 } // namespace gfx | 45 } // namespace gfx |
OLD | NEW |