diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-12-18 20:10:44 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-12-18 23:05:57 (GMT) |
commit | 722f1a71e397d1ebfad439fcaae6e199c8976289 (patch) | |
tree | cf6013675af88ef4c4a0c97eb900c3eee0a25933 /Source/cmCTest.cxx | |
parent | cd7bde80bf3c3e141a92058ad033833066da509b (diff) | |
download | CMake-722f1a71e397d1ebfad439fcaae6e199c8976289.zip CMake-722f1a71e397d1ebfad439fcaae6e199c8976289.tar.gz CMake-722f1a71e397d1ebfad439fcaae6e199c8976289.tar.bz2 |
CTest: Expand a string directly into a container.
Change the follow-up loop to use a const_iterator to log the
content.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2bf7b77..80dbaf3 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2598,16 +2598,14 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const std::string& def, return; } cmCTestLog(this, DEBUG, "PopulateCustomVector: " << def << std::endl); - std::vector<std::string> slist; - cmSystemTools::ExpandListArgument(dval, slist); - std::vector<std::string>::iterator it; vec.clear(); + cmSystemTools::ExpandListArgument(dval, vec); - for ( it = slist.begin(); it != slist.end(); ++it ) + for (std::vector<std::string>::const_iterator it = vec.begin(); + it != vec.end(); ++it ) { cmCTestLog(this, DEBUG, " -- " << *it << std::endl); - vec.push_back(*it); } } |