summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandArgumentParserHelper.cxx
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2017-10-25 15:34:01 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2017-10-25 17:56:33 (GMT)
commit576c079faadbff2bd5fafcbc9cecc03797625922 (patch)
tree46c285dd0443d7fdc50b38dae524a765b42bde3f /Source/cmCommandArgumentParserHelper.cxx
parent98cb9f3ee98261d0e7a591ba3b1971d49f1a2ee8 (diff)
downloadCMake-576c079faadbff2bd5fafcbc9cecc03797625922.zip
CMake-576c079faadbff2bd5fafcbc9cecc03797625922.tar.gz
CMake-576c079faadbff2bd5fafcbc9cecc03797625922.tar.bz2
cmCommandArgumentParser: remove the variable tokens from the class
Make them local constants in the lexer file.
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index e115993..bf314bd 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -21,13 +21,6 @@ cmCommandArgumentParserHelper::cmCommandArgumentParserHelper()
this->FileLine = -1;
this->FileName = nullptr;
this->RemoveEmpty = true;
- this->EmptyVariable[0] = 0;
- strcpy(this->DCURLYVariable, "${");
- strcpy(this->RCURLYVariable, "}");
- strcpy(this->ATVariable, "@");
- strcpy(this->DOLLARVariable, "$");
- strcpy(this->LCURLYVariable, "{");
- strcpy(this->BSLASHVariable, "\\");
this->NoEscapeMode = false;
this->ReplaceAtSyntax = false;
@@ -47,7 +40,7 @@ void cmCommandArgumentParserHelper::SetLineFile(long line, const char* file)
const char* cmCommandArgumentParserHelper::AddString(const std::string& str)
{
if (str.empty()) {
- return this->EmptyVariable;
+ return "";
}
char* stVal = new char[str.size() + 1];
strcpy(stVal, str.c_str());
@@ -62,7 +55,7 @@ const char* cmCommandArgumentParserHelper::ExpandSpecialVariable(
return this->ExpandVariable(var);
}
if (!var) {
- return this->EmptyVariable;
+ return "";
}
if (strcmp(key, "ENV") == 0) {
std::string str;
@@ -72,7 +65,7 @@ const char* cmCommandArgumentParserHelper::ExpandSpecialVariable(
}
return this->AddString(str);
}
- return this->EmptyVariable;
+ return "";
}
if (strcmp(key, "CACHE") == 0) {
if (const char* c =
@@ -82,7 +75,7 @@ const char* cmCommandArgumentParserHelper::ExpandSpecialVariable(
}
return this->AddString(c);
}
- return this->EmptyVariable;
+ return "";
}
std::ostringstream e;
e << "Syntax $" << key << "{} is not supported. "