Index: tools/flags/SkCommandLineFlags.h |
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h |
index 909718d3e79fa404c273541d4db89455176821e9..5909413523143f87fd9d25eab0d565a37d82c082 100644 |
--- a/tools/flags/SkCommandLineFlags.h |
+++ b/tools/flags/SkCommandLineFlags.h |
@@ -75,11 +75,6 @@ |
* of zero. Otherwise it will default to a size of 1 with the default string |
* as its value. All strings that follow the flag on the command line (until |
* a string that begins with '-') will be entries in the array. |
- * |
- * DEFINE_extended_string(args, .., .., extendedHelpString); |
- * |
- * creates a similar string array flag as DEFINE_string. The flag will have extended help text |
- * (extendedHelpString) that can the user can see with '--help <args>' flag. |
* |
* Any flag can be referenced from another file after using the following: |
* |
@@ -119,10 +114,6 @@ |
*/ |
class StringArray { |
public: |
- StringArray() { } |
- explicit StringArray(const SkTArray<SkString>& strings) |
- : fStrings(strings) { |
- } |
const char* operator[](int i) const { |
SkASSERT(i >= 0 && i < fStrings.count()); |
return fStrings[i].c_str(); |
@@ -213,15 +204,7 @@ |
nullptr, \ |
&FLAGS_##name, \ |
defaultValue, \ |
- helpString, nullptr) |
-#define DEFINE_extended_string(name, defaultValue, helpString, extendedHelpString) \ |
-SkCommandLineFlags::StringArray FLAGS_##name; \ |
-SK_UNUSED static bool unused_##name = SkFlagInfo::CreateStringFlag(TO_STRING(name), \ |
- nullptr, \ |
- &FLAGS_##name, \ |
- defaultValue, \ |
- helpString, \ |
- extendedHelpString) |
+ helpString) |
// string2 allows specifying a short name. There is an assert that shortName |
// is only 1 character. |
@@ -231,7 +214,7 @@ |
TO_STRING(shortName), \ |
&FLAGS_##name, \ |
defaultValue, \ |
- helpString, nullptr) |
+ helpString) |
#define DECLARE_string(name) extern SkCommandLineFlags::StringArray FLAGS_##name; |
@@ -290,7 +273,7 @@ |
*/ |
static bool CreateBoolFlag(const char* name, const char* shortName, bool* pBool, |
bool defaultValue, const char* helpString) { |
- SkFlagInfo* info = new SkFlagInfo(name, shortName, kBool_FlagType, helpString, nullptr); |
+ SkFlagInfo* info = new SkFlagInfo(name, shortName, kBool_FlagType, helpString); |
info->fBoolValue = pBool; |
*info->fBoolValue = info->fDefaultBool = defaultValue; |
return true; |
@@ -304,15 +287,14 @@ |
*/ |
static bool CreateStringFlag(const char* name, const char* shortName, |
SkCommandLineFlags::StringArray* pStrings, |
- const char* defaultValue, const char* helpString, |
- const char* extendedHelpString); |
+ const char* defaultValue, const char* helpString); |
/** |
* See comments for CreateBoolFlag. |
*/ |
static bool CreateIntFlag(const char* name, int32_t* pInt, |
int32_t defaultValue, const char* helpString) { |
- SkFlagInfo* info = new SkFlagInfo(name, nullptr, kInt_FlagType, helpString, nullptr); |
+ SkFlagInfo* info = new SkFlagInfo(name, nullptr, kInt_FlagType, helpString); |
info->fIntValue = pInt; |
*info->fIntValue = info->fDefaultInt = defaultValue; |
return true; |
@@ -320,7 +302,7 @@ |
static bool CreateIntFlag(const char* name, const char* shortName, int32_t* pInt, |
int32_t defaultValue, const char* helpString) { |
- SkFlagInfo* info = new SkFlagInfo(name, shortName, kInt_FlagType, helpString, nullptr); |
+ SkFlagInfo* info = new SkFlagInfo(name, shortName, kInt_FlagType, helpString); |
info->fIntValue = pInt; |
*info->fIntValue = info->fDefaultInt = defaultValue; |
return true; |
@@ -331,7 +313,7 @@ |
*/ |
static bool CreateDoubleFlag(const char* name, double* pDouble, |
double defaultValue, const char* helpString) { |
- SkFlagInfo* info = new SkFlagInfo(name, nullptr, kDouble_FlagType, helpString, nullptr); |
+ SkFlagInfo* info = new SkFlagInfo(name, nullptr, kDouble_FlagType, helpString); |
info->fDoubleValue = pDouble; |
*info->fDoubleValue = info->fDefaultDouble = defaultValue; |
return true; |
@@ -401,7 +383,6 @@ |
const SkString& shortName() const { return fShortName; } |
const SkString& help() const { return fHelpString; } |
- const SkString& extendedHelp() const { return fExtendedHelpString; } |
SkString defaultValue() const { |
SkString result; |
@@ -440,13 +421,11 @@ |
} |
private: |
- SkFlagInfo(const char* name, const char* shortName, FlagTypes type, const char* helpString, |
- const char* extendedHelpString) |
+ SkFlagInfo(const char* name, const char* shortName, FlagTypes type, const char* helpString) |
: fName(name) |
, fShortName(shortName) |
, fFlagType(type) |
, fHelpString(helpString) |
- , fExtendedHelpString(extendedHelpString) |
, fBoolValue(nullptr) |
, fDefaultBool(false) |
, fIntValue(nullptr) |
@@ -474,7 +453,6 @@ |
SkString fShortName; |
FlagTypes fFlagType; |
SkString fHelpString; |
- SkString fExtendedHelpString; |
bool* fBoolValue; |
bool fDefaultBool; |
int32_t* fIntValue; |