diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-08-30 10:37:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-08-30 10:38:00 (GMT) |
commit | 7ddd43183dadba9c42094540f3371dd38054bc12 (patch) | |
tree | 7f048ea2e1a75569eb5472c238389acfc768995e /Source/CTest/cmCTestCurl.cxx | |
parent | 5cac887297e58efe9553d7aa2bca9139f84bf094 (diff) | |
parent | 190e3825d44d4f846d37e1ec7372f5829a5b6b3e (diff) | |
download | CMake-7ddd43183dadba9c42094540f3371dd38054bc12.zip CMake-7ddd43183dadba9c42094540f3371dd38054bc12.tar.gz CMake-7ddd43183dadba9c42094540f3371dd38054bc12.tar.bz2 |
Merge topic 'cstyle-casts'
190e3825 Replace C-style casts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1176
Diffstat (limited to 'Source/CTest/cmCTestCurl.cxx')
-rw-r--r-- | Source/CTest/cmCTestCurl.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index 492232b..b175d44 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -41,7 +41,7 @@ namespace { size_t curlWriteMemoryCallback(void* ptr, size_t size, size_t nmemb, void* data) { - int realsize = (int)(size * nmemb); + int realsize = static_cast<int>(size * nmemb); std::vector<char>* vec = static_cast<std::vector<char>*>(data); const char* chPtr = static_cast<char*>(ptr); @@ -156,8 +156,8 @@ bool cmCTestCurl::UploadFile(std::string const& local_file, ::curl_easy_setopt(this->Curl, CURLOPT_HTTPHEADER, headers); std::vector<char> responseData; std::vector<char> debugData; - ::curl_easy_setopt(this->Curl, CURLOPT_FILE, (void*)&responseData); - ::curl_easy_setopt(this->Curl, CURLOPT_DEBUGDATA, (void*)&debugData); + ::curl_easy_setopt(this->Curl, CURLOPT_FILE, &responseData); + ::curl_easy_setopt(this->Curl, CURLOPT_DEBUGDATA, &debugData); ::curl_easy_setopt(this->Curl, CURLOPT_FAILONERROR, 1); // Now run off and do what you've been told! ::curl_easy_perform(this->Curl); @@ -206,8 +206,8 @@ bool cmCTestCurl::HttpRequest(std::string const& url, ::curl_easy_setopt(this->Curl, CURLOPT_DEBUGFUNCTION, curlDebugCallback); std::vector<char> responseData; std::vector<char> debugData; - ::curl_easy_setopt(this->Curl, CURLOPT_FILE, (void*)&responseData); - ::curl_easy_setopt(this->Curl, CURLOPT_DEBUGDATA, (void*)&debugData); + ::curl_easy_setopt(this->Curl, CURLOPT_FILE, &responseData); + ::curl_easy_setopt(this->Curl, CURLOPT_DEBUGDATA, &debugData); ::curl_easy_setopt(this->Curl, CURLOPT_FAILONERROR, 1); // Add headers if any were specified. |