Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: tools/flags/SkCommandLineFlags.cpp

Issue 19537005: Revert r10280, which caused https://code.google.com/p/skia/issues/detail?id=1441 (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/flags/SkCommandLineFlags.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommandLineFlags.cpp
===================================================================
--- tools/flags/SkCommandLineFlags.cpp (revision 10283)
+++ tools/flags/SkCommandLineFlags.cpp (working copy)
@@ -303,34 +303,3 @@
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;
-}
« no previous file with comments | « tools/flags/SkCommandLineFlags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698