diff options
author | Brad King <brad.king@kitware.com> | 2017-05-05 13:49:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-05 13:49:41 (GMT) |
commit | b605bdfd03ccb0c7003a110004afe7981853bc76 (patch) | |
tree | f36c52e3462d6c16a954bba6760d321e91a9a56a /Source/cmFileCommand.cxx | |
parent | 5a9f1b87c30870a6a705f882039b2b4e98126813 (diff) | |
parent | 3e027d9def0f2d9f542cb71eda12e9527c418c9e (diff) | |
download | CMake-b605bdfd03ccb0c7003a110004afe7981853bc76.zip CMake-b605bdfd03ccb0c7003a110004afe7981853bc76.tar.gz CMake-b605bdfd03ccb0c7003a110004afe7981853bc76.tar.bz2 |
Merge topic 'vector-over-list'
3e027d9d c++: prefer vectors over lists
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !799
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index fa166a0..2c25e9b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -10,11 +10,11 @@ #include "cmsys/String.hxx" #include <algorithm> #include <assert.h> -#include <list> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <vector> #include "cmAlgorithms.h" #include "cmCommandArgumentsHelper.h" @@ -2618,7 +2618,7 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args) bool showProgress = false; std::string userpwd; - std::list<std::string> curl_headers; + std::vector<std::string> curl_headers; while (i != args.end()) { if (*i == "TIMEOUT") { @@ -2862,7 +2862,7 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args) } struct curl_slist* headers = CM_NULLPTR; - for (std::list<std::string>::const_iterator h = curl_headers.begin(); + for (std::vector<std::string>::const_iterator h = curl_headers.begin(); h != curl_headers.end(); ++h) { headers = ::curl_slist_append(headers, h->c_str()); } @@ -2952,7 +2952,7 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args) bool showProgress = false; std::string userpwd; - std::list<std::string> curl_headers; + std::vector<std::string> curl_headers; while (i != args.end()) { if (*i == "TIMEOUT") { @@ -3120,7 +3120,7 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args) } struct curl_slist* headers = CM_NULLPTR; - for (std::list<std::string>::const_iterator h = curl_headers.begin(); + for (std::vector<std::string>::const_iterator h = curl_headers.begin(); h != curl_headers.end(); ++h) { headers = ::curl_slist_append(headers, h->c_str()); } |