summaryrefslogtreecommitdiffstats
path: root/Source/cmFindProgramCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-01 17:42:14 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-02 14:17:21 (GMT)
commited4de3c9849f323c735929ad3e32d2450ce303a9 (patch)
tree382017148aec91e994906a35a07f42e26f1402ff /Source/cmFindProgramCommand.cxx
parentbf32b95efed986eed7f5e0c568c5bc9559bcb854 (diff)
downloadCMake-ed4de3c9849f323c735929ad3e32d2450ce303a9.zip
CMake-ed4de3c9849f323c735929ad3e32d2450ce303a9.tar.gz
CMake-ed4de3c9849f323c735929ad3e32d2450ce303a9.tar.bz2
cmFindProgramCommand: Use Names member instead of passing it
Diffstat (limited to 'Source/cmFindProgramCommand.cxx')
-rw-r--r--Source/cmFindProgramCommand.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index fbd9fd3..ef1c16b 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -41,7 +41,7 @@ bool cmFindProgramCommand
return true;
}
- std::string result = FindProgram(this->Names);
+ std::string result = FindProgram();
if(result != "")
{
// Save the value in the cache
@@ -59,31 +59,30 @@ bool cmFindProgramCommand
return true;
}
-std::string cmFindProgramCommand::FindProgram(std::vector<std::string> names)
+std::string cmFindProgramCommand::FindProgram()
{
std::string program = "";
if(this->SearchAppBundleFirst || this->SearchAppBundleOnly)
{
- program = FindAppBundle(names);
+ program = FindAppBundle();
}
if(program.empty() && !this->SearchAppBundleOnly)
{
- program = cmSystemTools::FindProgram(names, this->SearchPaths, true);
+ program = cmSystemTools::FindProgram(this->Names, this->SearchPaths, true);
}
if(program.empty() && this->SearchAppBundleLast)
{
- program = this->FindAppBundle(names);
+ program = this->FindAppBundle();
}
return program;
}
-std::string cmFindProgramCommand
-::FindAppBundle(std::vector<std::string> names)
+std::string cmFindProgramCommand::FindAppBundle()
{
- for(std::vector<std::string>::const_iterator name = names.begin();
- name != names.end() ; ++name)
+ for(std::vector<std::string>::const_iterator name = this->Names.begin();
+ name != this->Names.end() ; ++name)
{
std::string appName = *name + std::string(".app");