summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionCommand.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:42:58 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:18:39 (GMT)
commit7bbaa4283de26864b2e55e819db0884771585467 (patch)
treeecb748dbe41a13d8bdea77acd0049cde999d933e /Source/cmFunctionCommand.cxx
parentbe9db98946b7918f279812fd0616abb650eebed0 (diff)
downloadCMake-7bbaa4283de26864b2e55e819db0884771585467.zip
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.gz
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.bz2
Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r--Source/cmFunctionCommand.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index ce36145..10b47b9 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -65,7 +65,7 @@ public:
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() const { return this->Args[0].c_str(); }
-
+
/**
* Succinct documentation.
*/
@@ -131,15 +131,15 @@ bool cmFunctionHelperCommand::InvokeInitialPass
{
cmOStringStream tmpStream;
tmpStream << "ARGV" << t;
- this->Makefile->AddDefinition(tmpStream.str().c_str(),
+ this->Makefile->AddDefinition(tmpStream.str().c_str(),
expandedArgs[t].c_str());
this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
}
-
+
// define the formal arguments
for (unsigned int j = 1; j < this->Args.size(); ++j)
{
- this->Makefile->AddDefinition(this->Args[j].c_str(),
+ this->Makefile->AddDefinition(this->Args[j].c_str(),
expandedArgs[j-1].c_str());
}
@@ -208,7 +208,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
else if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endfunction"))
{
// if this is the endfunction for this function then execute
- if (!this->Depth)
+ if (!this->Depth)
{
std::string name = this->Args[0];
std::vector<std::string>::size_type cc;
@@ -224,20 +224,20 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
f->Args = this->Args;
f->Functions = this->Functions;
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].Arguments[j].FilePath =
f->Functions[i].FilePath.c_str();
}
}
std::string newName = "_" + this->Args[0];
- mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(),
+ mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(),
newName.c_str());
mf.AddCommand(f);
@@ -265,7 +265,7 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf)
if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endfunction"))
{
std::vector<std::string> expandedArguments;
- mf.ExpandArguments(lff.Arguments, expandedArguments);
+ mf.ExpandArguments(lff.Arguments, expandedArguments);
// if the endfunction has arguments then make sure
// they match the ones in the openeing function command
if ((expandedArguments.empty() ||
@@ -291,7 +291,7 @@ bool cmFunctionCommand
cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker();
for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j)
- {
+ {
f->Args.push_back(*j);
}
this->Makefile->AddFunctionBlocker(f);