diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-30 15:52:46 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-30 15:52:46 +0000 |
commit | a6f37e77c1c95f0a06ac55ff659cb7b8dfabefcf (patch) | |
tree | 6310645cf497f908894d36bf749e47c53ef5233d /tools/flags/SkCommandLineFlags.h | |
parent | 06f05989570fbf2ced3d2d1690ea1276b7330b5f (diff) |
Add ShouldSkip variant that can read a --match flag directly.
Just seemed like we were going through lots of hoops for this common case.
BUG=
R=scroggo@google.com
Author: mtklein@google.com
Review URL: https://chromiumcodereview.appspot.com/23708009
git-svn-id: http://skia.googlecode.com/svn/trunk@11034 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/flags/SkCommandLineFlags.h')
-rw-r--r-- | tools/flags/SkCommandLineFlags.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h index b0199f6717..c324a1f6d0 100644 --- a/tools/flags/SkCommandLineFlags.h +++ b/tools/flags/SkCommandLineFlags.h @@ -108,15 +108,6 @@ public: */ static void Parse(int argc, char** argv); - /* Takes a list of the form [~][^]match[$] - ~ causes a matching test to always be skipped - ^ requires the start of the test to match - $ requires the end of the test to match - ^ and $ requires an exact match - If a test does not match any list entry, it is skipped unless some list entry starts with ~ - */ - static bool ShouldSkip(const SkTDArray<const char*>& strings, const char* name); - /** * Custom class for holding the arguments for a string flag. * Publicly only has accessors so the strings cannot be modified. @@ -150,6 +141,16 @@ public: friend class SkFlagInfo; }; + /* Takes a list of the form [~][^]match[$] + ~ causes a matching test to always be skipped + ^ requires the start of the test to match + $ requires the end of the test to match + ^ and $ requires an exact match + If a test does not match any list entry, it is skipped unless some list entry starts with ~ + */ + static bool ShouldSkip(const SkTDArray<const char*>& strings, const char* name); + static bool ShouldSkip(const StringArray& strings, const char* name); + private: static SkFlagInfo* gHead; static SkString gUsage; |