OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SkCommandLineFlags.h" | 8 #include "SkCommandLineFlags.h" |
9 #include "SkTDArray.h" | 9 #include "SkTDArray.h" |
10 | 10 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 break; | 271 break; |
272 case SkFlagInfo::kInt_FlagType: | 272 case SkFlagInfo::kInt_FlagType: |
273 i++; | 273 i++; |
274 flag->setInt(atoi(argv[i])); | 274 flag->setInt(atoi(argv[i])); |
275 break; | 275 break; |
276 case SkFlagInfo::kDouble_FlagType: | 276 case SkFlagInfo::kDouble_FlagType: |
277 i++; | 277 i++; |
278 flag->setDouble(atof(argv[i])); | 278 flag->setDouble(atof(argv[i])); |
279 break; | 279 break; |
280 default: | 280 default: |
281 SkASSERT(!"Invalid flag type"); | 281 SkDEBUGFAIL("Invalid flag type"); |
282 } | 282 } |
283 break; | 283 break; |
284 } | 284 } |
285 flag = flag->next(); | 285 flag = flag->next(); |
286 } | 286 } |
287 if (!flagMatched) { | 287 if (!flagMatched) { |
288 SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]); | 288 SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]); |
289 exit(-1); | 289 exit(-1); |
290 } | 290 } |
291 } | 291 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 if (matchStart ? (!matchEnd || matchLen == testLen) | 327 if (matchStart ? (!matchEnd || matchLen == testLen) |
328 && strncmp(name, matchName, matchLen) == 0 | 328 && strncmp(name, matchName, matchLen) == 0 |
329 : matchEnd ? matchLen <= testLen | 329 : matchEnd ? matchLen <= testLen |
330 && strncmp(name + testLen - matchLen, matchName, matchLen) == 0 | 330 && strncmp(name + testLen - matchLen, matchName, matchLen) == 0 |
331 : strstr(name, matchName) != 0) { | 331 : strstr(name, matchName) != 0) { |
332 return matchExclude; | 332 return matchExclude; |
333 } | 333 } |
334 } | 334 } |
335 return !anyExclude; | 335 return !anyExclude; |
336 } | 336 } |
OLD | NEW |