aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/flags/SkCommandLineFlags.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/flags/SkCommandLineFlags.cpp')
-rw-r--r--tools/flags/SkCommandLineFlags.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp
index b088b4e4d3..ed8db8e705 100644
--- a/tools/flags/SkCommandLineFlags.cpp
+++ b/tools/flags/SkCommandLineFlags.cpp
@@ -303,34 +303,3 @@ void SkCommandLineFlags::Parse(int argc, char** argv) {
exit(0);
}
}
-
-bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const char* name) {
- int count = strings.count();
- size_t testLen = strlen(name);
- bool anyExclude = count == 0;
- for (int i = 0; i < strings.count(); ++i) {
- const char* matchName = strings[i];
- size_t matchLen = strlen(matchName);
- bool matchExclude, matchStart, matchEnd;
- if ((matchExclude = matchName[0] == '~')) {
- anyExclude = true;
- matchName++;
- matchLen--;
- }
- if ((matchStart = matchName[0] == '^')) {
- matchName++;
- matchLen--;
- }
- if ((matchEnd = matchName[matchLen - 1] == '$')) {
- matchLen--;
- }
- if (matchStart ? (!matchEnd || matchLen == testLen)
- && strncmp(name, matchName, matchLen) == 0
- : matchEnd ? matchLen <= testLen
- && strncmp(name + testLen - matchLen, matchName, matchLen) == 0
- : strstr(name, matchName) != 0) {
- return matchExclude;
- }
- }
- return !anyExclude;
-}