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 #include "SkTSort.h" | 10 #include "SkTSort.h" |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 flag->setDouble(atof(argv[i])); | 328 flag->setDouble(atof(argv[i])); |
329 break; | 329 break; |
330 default: | 330 default: |
331 SkDEBUGFAIL("Invalid flag type"); | 331 SkDEBUGFAIL("Invalid flag type"); |
332 } | 332 } |
333 break; | 333 break; |
334 } | 334 } |
335 flag = flag->next(); | 335 flag = flag->next(); |
336 } | 336 } |
337 if (!flagMatched) { | 337 if (!flagMatched) { |
338 #if SK_BUILD_FOR_MAC | 338 #if defined(SK_BUILD_FOR_MAC) |
339 if (SkStrStartsWith(argv[i], "NSDocumentRevisions") | 339 if (SkStrStartsWith(argv[i], "NSDocumentRevisions") |
340 || SkStrStartsWith(argv[i], "-NSDocumentRevisions")) { | 340 || SkStrStartsWith(argv[i], "-NSDocumentRevisions")) { |
341 i++; // skip YES | 341 i++; // skip YES |
342 } else | 342 } else |
343 #endif | 343 #endif |
344 if (FLAGS_undefok) { | 344 if (FLAGS_undefok) { |
345 SkDebugf("FYI: ignoring unknown flag '%s'.\n", argv[i]); | 345 SkDebugf("FYI: ignoring unknown flag '%s'.\n", argv[i]); |
346 } else { | 346 } else { |
347 SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]); | 347 SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]); |
348 exit(-1); | 348 exit(-1); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 } | 399 } |
400 | 400 |
401 } // namespace | 401 } // namespace |
402 | 402 |
403 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { | 403 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { |
404 return ShouldSkipImpl(strings, name); | 404 return ShouldSkipImpl(strings, name); |
405 } | 405 } |
406 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { | 406 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { |
407 return ShouldSkipImpl(strings, name); | 407 return ShouldSkipImpl(strings, name); |
408 } | 408 } |
OLD | NEW |