Index: tools/flags/SkCommandLineFlags.cpp |
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp |
index 084f48a8aab254f3a3e8cd496b547725bd7532a1..656a00a76d8f57c226d593e5cafabf6f6bbee201 100644 |
--- a/tools/flags/SkCommandLineFlags.cpp |
+++ b/tools/flags/SkCommandLineFlags.cpp |
@@ -304,7 +304,10 @@ void SkCommandLineFlags::Parse(int argc, char** argv) { |
} |
} |
-bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const char* name) { |
+namespace { |
+ |
+template <typename Strings> |
+bool ShouldSkipImpl(const Strings& strings, const char* name) { |
int count = strings.count(); |
size_t testLen = strlen(name); |
bool anyExclude = count == 0; |
@@ -334,3 +337,12 @@ bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const |
} |
return !anyExclude; |
} |
+ |
+} // namespace |
+ |
+bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const char* name) { |
+ return ShouldSkipImpl(strings, name); |
+} |
+bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name) { |
+ return ShouldSkipImpl(strings, name); |
+} |