diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-23 21:43:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-21 18:57:26 (GMT) |
commit | 782657db48e0d5f0d33a19ad51678d36ddfa7ad5 (patch) | |
tree | f50ec60318de38794369f9c1658c0cbecd07e58d | |
parent | a863c59f70a7556c010990a362e4d13792670148 (diff) | |
download | CMake-782657db48e0d5f0d33a19ad51678d36ddfa7ad5.zip CMake-782657db48e0d5f0d33a19ad51678d36ddfa7ad5.tar.gz CMake-782657db48e0d5f0d33a19ad51678d36ddfa7ad5.tar.bz2 |
cmListFileArgument: Remove FilePath member.
It is now unused.
-rw-r--r-- | Source/cmCPluginAPI.cxx | 3 | ||||
-rw-r--r-- | Source/cmFunctionCommand.cxx | 11 | ||||
-rw-r--r-- | Source/cmListFileCache.cxx | 5 | ||||
-rw-r--r-- | Source/cmListFileCache.h | 12 | ||||
-rw-r--r-- | Source/cmMacroCommand.cxx | 5 | ||||
-rw-r--r-- | Source/cmVariableWatchCommand.cxx | 12 |
6 files changed, 14 insertions, 34 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 0d24ed5..591a2cd 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -426,8 +426,7 @@ int CCONV cmExecuteCommand(void *arg, const char *name, { // Assume all arguments are quoted. lff.Arguments.push_back( - cmListFileArgument(args[i], cmListFileArgument::Quoted, - "[CMake-Plugin]", 0)); + cmListFileArgument(args[i], cmListFileArgument::Quoted, 0)); } cmExecutionStatus status; return mf->ExecuteCommand(lff,status); diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 662f77d..b3576c3 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -176,17 +176,6 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, f->FilePath = this->GetStartingContext().FilePath; mf.RecordPolicies(f->Policies); - // Set the FilePath on the arguments to match the function since it is - // not stored and the original values may be freed - for (unsigned int i = 0; i < f->Functions.size(); ++i) - { - for (unsigned int j = 0; j < f->Functions[i].Arguments.size(); ++j) - { - f->Functions[i].Arguments[j].FilePath = - f->Functions[i].FilePath.c_str(); - } - } - std::string newName = "_" + this->Args[0]; mf.GetState()->RenameCommand(this->Args[0], newName); mf.GetState()->AddCommand(f); diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index ca58314..006ca4c 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -234,8 +234,7 @@ bool cmListFile::ParseFile(const char* filename, { cmListFileFunction project; project.Name = "PROJECT"; - cmListFileArgument prj("Project", cmListFileArgument::Unquoted, - filename, 0); + cmListFileArgument prj("Project", cmListFileArgument::Unquoted, 0); project.Arguments.push_back(prj); this->Functions.insert(this->Functions.begin(),project); } @@ -375,7 +374,7 @@ bool cmListFileParser::ParseFunction(const char* name, long line) bool cmListFileParser::AddArgument(cmListFileLexer_Token* token, cmListFileArgument::Delimiter delim) { - cmListFileArgument a(token->text, delim, this->FileName, token->line); + cmListFileArgument a(token->text, delim, token->line); this->Function.Arguments.push_back(a); if(this->Separation == SeparationOkay) { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 4002d94..f5859ec 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -33,12 +33,11 @@ struct cmListFileArgument Quoted, Bracket }; - cmListFileArgument(): Value(), Delim(Unquoted), FilePath(0), Line(0) {} - cmListFileArgument(const cmListFileArgument& r): - Value(r.Value), Delim(r.Delim), FilePath(r.FilePath), Line(r.Line) {} - cmListFileArgument(const std::string& v, Delimiter d, const char* file, - long line): Value(v), Delim(d), - FilePath(file), Line(line) {} + cmListFileArgument(): Value(), Delim(Unquoted), Line(0) {} + cmListFileArgument(const cmListFileArgument& r) + : Value(r.Value), Delim(r.Delim), Line(r.Line) {} + cmListFileArgument(const std::string& v, Delimiter d, long line) + : Value(v), Delim(d), Line(line) {} bool operator == (const cmListFileArgument& r) const { return (this->Value == r.Value) && (this->Delim == r.Delim); @@ -49,7 +48,6 @@ struct cmListFileArgument } std::string Value; Delimiter Delim; - const char* FilePath; long Line; }; diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index c3e67d7..0b945b2 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -139,10 +139,6 @@ bool cmMacroHelperCommand::InvokeInitialPass this->Functions[c].Arguments.begin(); k != this->Functions[c].Arguments.end(); ++k) { - // Set the FilePath on the arguments to match the function since it is - // not stored and the original values may be freed - k->FilePath = this->FilePath.c_str(); - cmListFileArgument arg; arg.Value = k->Value; if(k->Delim != cmListFileArgument::Bracket) @@ -173,7 +169,6 @@ bool cmMacroHelperCommand::InvokeInitialPass } } arg.Delim = k->Delim; - arg.FilePath = k->FilePath; arg.Line = k->Line; newLFF.Arguments.push_back(arg); } diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index 09cef5e..6521c04 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -49,21 +49,21 @@ static void cmVariableWatchCommandVariableAccessed( newLFF.Arguments.clear(); newLFF.Arguments.push_back( cmListFileArgument(variable, cmListFileArgument::Quoted, - "unknown", 9999)); + 9999)); newLFF.Arguments.push_back( cmListFileArgument(accessString, cmListFileArgument::Quoted, - "unknown", 9999)); + 9999)); newLFF.Arguments.push_back( cmListFileArgument(newValue?newValue:"", cmListFileArgument::Quoted, - "unknown", 9999)); + 9999)); newLFF.Arguments.push_back( cmListFileArgument(currentListFile, cmListFileArgument::Quoted, - "unknown", 9999)); + 9999)); newLFF.Arguments.push_back( cmListFileArgument(stack, cmListFileArgument::Quoted, - "unknown", 9999)); + 9999)); newLFF.Name = data->Command; - newLFF.FilePath = "Some weird path"; + newLFF.FilePath = "unknown"; newLFF.Line = 9999; cmExecutionStatus status; if(!makefile->ExecuteCommand(newLFF,status)) |