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" |
11 | 11 |
12 #include <stdlib.h> | 12 #include <stdlib.h> |
13 | 13 |
14 #if defined(GOOGLE3) && defined(SK_BUILD_FOR_ANDROID) | 14 #if defined(GOOGLE3) && (defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_I
OS)) |
15 // I don't know why, but this is defined by //base only for Android. | 15 // I don't know why, but this is defined by //base only for non-Linux. |
16 DECLARE_bool(undefok) | 16 DECLARE_bool(undefok) |
17 #else | 17 #else |
18 DEFINE_bool(undefok, false, "Silently ignore unknown flags instead of crashi
ng."); | 18 DEFINE_bool(undefok, false, "Silently ignore unknown flags instead of crashi
ng."); |
19 #endif | 19 #endif |
20 | 20 |
21 template <typename T> static void ignore_result(const T&) {} | 21 template <typename T> static void ignore_result(const T&) {} |
22 | 22 |
23 bool SkFlagInfo::CreateStringFlag(const char* name, const char* shortName, | 23 bool SkFlagInfo::CreateStringFlag(const char* name, const char* shortName, |
24 SkCommandLineFlags::StringArray* pStrings, | 24 SkCommandLineFlags::StringArray* pStrings, |
25 const char* defaultValue, const char* helpStri
ng) { | 25 const char* defaultValue, const char* helpStri
ng) { |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 } | 382 } |
383 | 383 |
384 } // namespace | 384 } // namespace |
385 | 385 |
386 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { | 386 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { |
387 return ShouldSkipImpl(strings, name); | 387 return ShouldSkipImpl(strings, name); |
388 } | 388 } |
389 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { | 389 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { |
390 return ShouldSkipImpl(strings, name); | 390 return ShouldSkipImpl(strings, name); |
391 } | 391 } |
OLD | NEW |