diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-15 22:42:59 (GMT) |
---|---|---|
committer | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-21 08:23:19 (GMT) |
commit | 37d9387be37b5ad51b518d5df467b64e88f73350 (patch) | |
tree | 91d6c8ff19c59b296bef0166b8a4da6ff6180190 /Source/CTest/cmCTestSubmitHandler.cxx | |
parent | 1cf94375174e7b939148a3ec7e3ae004d511719e (diff) | |
download | CMake-37d9387be37b5ad51b518d5df467b64e88f73350.zip CMake-37d9387be37b5ad51b518d5df467b64e88f73350.tar.gz CMake-37d9387be37b5ad51b518d5df467b64e88f73350.tar.bz2 |
Replace empty-string comparisons with checking against `empty()`.
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 137cea9..e51e168 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -496,11 +496,11 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, ? "" : this->GetOption("RetryCount"); - int delay = retryDelay == "" + int delay = retryDelay.empty() ? atoi(this->CTest->GetCTestConfiguration("CTestSubmitRetryDelay") .c_str()) : atoi(retryDelay.c_str()); - int count = retryCount == "" + int count = retryCount.empty() ? atoi(this->CTest->GetCTestConfiguration("CTestSubmitRetryCount") .c_str()) : atoi(retryCount.c_str()); @@ -1032,14 +1032,14 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file, ? "" : this->GetOption("RetryCount"); unsigned long retryDelay = 0; - if (retryDelayString != "") { + if (!retryDelayString.empty()) { if (!cmSystemTools::StringToULong(retryDelayString.c_str(), &retryDelay)) { cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : " << retryDelayString << std::endl); } } unsigned long retryCount = 0; - if (retryCountString != "") { + if (!retryCountString.empty()) { if (!cmSystemTools::StringToULong(retryCountString.c_str(), &retryCount)) { cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : " << retryCountString << std::endl); @@ -1361,7 +1361,7 @@ int cmCTestSubmitHandler::ProcessHandler() std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod")); - if (dropMethod == "" || dropMethod == "ftp") { + if (dropMethod.empty() || dropMethod == "ftp") { ofs << "Using drop method: FTP" << std::endl; cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Using FTP submit method" << std::endl |