| 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 "SkParse.h" | 10 #include "SkParse.h" |
| 11 | 11 |
| 12 #include <stdlib.h> |
| 13 |
| 12 static inline bool is_between(int c, int min, int max) | 14 static inline bool is_between(int c, int min, int max) |
| 13 { | 15 { |
| 14 return (unsigned)(c - min) <= (unsigned)(max - min); | 16 return (unsigned)(c - min) <= (unsigned)(max - min); |
| 15 } | 17 } |
| 16 | 18 |
| 17 static inline bool is_ws(int c) | 19 static inline bool is_ws(int c) |
| 18 { | 20 { |
| 19 return is_between(c, 1, 32); | 21 return is_between(c, 1, 32); |
| 20 } | 22 } |
| 21 | 23 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 return -1; | 288 return -1; |
| 287 } | 289 } |
| 288 | 290 |
| 289 #ifdef SK_SUPPORT_UNITTEST | 291 #ifdef SK_SUPPORT_UNITTEST |
| 290 void SkParse::UnitTest() | 292 void SkParse::UnitTest() |
| 291 { | 293 { |
| 292 // !!! additional parse tests go here | 294 // !!! additional parse tests go here |
| 293 SkParse::TestColor(); | 295 SkParse::TestColor(); |
| 294 } | 296 } |
| 295 #endif | 297 #endif |
| OLD | NEW |