diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-14 20:31:46 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-11 21:57:55 (GMT) |
commit | 8910224950a2b723e0d4fd7c21a326af7fb2e050 (patch) | |
tree | 09eb05962917fc5f205db31ae06b8c105813617e /Source/cmFindPackageCommand.cxx | |
parent | 7b8725bf8472ebf4781ddd60ef8fcca9c3ad98dd (diff) | |
download | CMake-8910224950a2b723e0d4fd7c21a326af7fb2e050.zip CMake-8910224950a2b723e0d4fd7c21a326af7fb2e050.tar.gz CMake-8910224950a2b723e0d4fd7c21a326af7fb2e050.tar.bz2 |
Replace common loop pattern with cmJoin
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 7746980..fd9b236 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1064,26 +1064,11 @@ void cmFindPackageCommand::AppendToFoundProperty(bool found) } - std::string tmp; - const char* sep =""; - for(size_t i=0; i<foundContents.size(); i++) - { - tmp += sep; - tmp += foundContents[i]; - sep = ";"; - } - + std::string tmp = cmJoin(foundContents, ";"); this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_FOUND", tmp.c_str()); - tmp = ""; - sep = ""; - for(size_t i=0; i<notFoundContents.size(); i++) - { - tmp += sep; - tmp += notFoundContents[i]; - sep = ";"; - } + tmp = cmJoin(notFoundContents, ";"); this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_NOT_FOUND", tmp.c_str()); } |