summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-23 07:41:23 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-27 07:58:46 (GMT)
commit190e3825d44d4f846d37e1ec7372f5829a5b6b3e (patch)
tree85605643bc6fcdcb455d5fe58469a08874ef8673 /Source/cmCTest.cxx
parent2ade9a0264b7c8d4e97d9d820e8c1531f3d1a43c (diff)
downloadCMake-190e3825d44d4f846d37e1ec7372f5829a5b6b3e.zip
CMake-190e3825d44d4f846d37e1ec7372f5829a5b6b3e.tar.gz
CMake-190e3825d44d4f846d37e1ec7372f5829a5b6b3e.tar.bz2
Replace C-style casts
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index f948645..66b8f07 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -157,7 +157,7 @@ std::string cmCTest::GetCostDataFile()
static size_t HTTPResponseCallback(void* ptr, size_t size, size_t nmemb,
void* data)
{
- int realsize = (int)(size * nmemb);
+ int realsize = static_cast<int>(size * nmemb);
std::string* response = static_cast<std::string*>(data);
const char* chPtr = static_cast<char*>(ptr);
@@ -206,7 +206,7 @@ int cmCTest::HTTPRequest(std::string url, HTTPMethod method,
// set response options
::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HTTPResponseCallback);
- ::curl_easy_setopt(curl, CURLOPT_FILE, (void*)&response);
+ ::curl_easy_setopt(curl, CURLOPT_FILE, &response);
::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
CURLcode res = ::curl_easy_perform(curl);
@@ -227,7 +227,7 @@ std::string cmCTest::MakeURLSafe(const std::string& str)
if ((ch > 126 || ch < 32 || ch == '&' || ch == '%' || ch == '+' ||
ch == '=' || ch == '@') &&
ch != 9) {
- sprintf(buffer, "%02x;", (unsigned int)ch);
+ sprintf(buffer, "%02x;", static_cast<unsigned int>(ch));
ost << buffer;
} else {
ost << ch;
@@ -1767,7 +1767,7 @@ bool cmCTest::HandleCommandLineArguments(size_t& i,
if (this->CheckArgument(arg, "--timeout") && i < args.size() - 1) {
i++;
- double timeout = (double)atof(args[i].c_str());
+ double timeout = atof(args[i].c_str());
this->GlobalTimeout = timeout;
}