| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkTypes.h" | 10 #include "SkTypes.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 int SkToInt(intmax_t x) { | 44 int SkToInt(intmax_t x) { |
| 45 SkASSERT((int)x == x); | 45 SkASSERT((int)x == x); |
| 46 return (int)x; | 46 return (int)x; |
| 47 } | 47 } |
| 48 | 48 |
| 49 unsigned SkToUInt(uintmax_t x) { | 49 unsigned SkToUInt(uintmax_t x) { |
| 50 SkASSERT((unsigned)x == x); | 50 SkASSERT((unsigned)x == x); |
| 51 return (unsigned)x; | 51 return (unsigned)x; |
| 52 } | 52 } |
| 53 | 53 |
| 54 size_t SkToSizeT(uintmax_t x) { |
| 55 SkASSERT((size_t)x == x); |
| 56 return (size_t)x; |
| 57 } |
| 58 |
| 54 #endif | 59 #endif |
| OLD | NEW |