OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkConstexprMath_DEFINED | 8 #ifndef SkConstexprMath_DEFINED |
9 #define SkConstexprMath_DEFINED | 9 #define SkConstexprMath_DEFINED |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 if the bits of type t are considered as unsigned base two. | 45 if the bits of type t are considered as unsigned base two. |
46 */ | 46 */ |
47 #define SK_DIGITS_IN(t) SK_BASE_N_DIGITS_IN(10, (t)) | 47 #define SK_DIGITS_IN(t) SK_BASE_N_DIGITS_IN(10, (t)) |
48 | 48 |
49 // Compile-time constant maximum value of two unsigned values. | 49 // Compile-time constant maximum value of two unsigned values. |
50 template <uintmax_t a, uintmax_t b> struct SkTUMax { | 50 template <uintmax_t a, uintmax_t b> struct SkTUMax { |
51 static const uintmax_t value = (b < a) ? a : b; | 51 static const uintmax_t value = (b < a) ? a : b; |
52 }; | 52 }; |
53 | 53 |
54 #endif | 54 #endif |
OLD | NEW |