mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
Replace foo.size() pattern with !foo.empty().
This commit is contained in:
+10
-10
@@ -2992,7 +2992,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
msg = "returning early; file already exists with expected ";
|
||||
msg += hashMatchMSG;
|
||||
msg += "\"";
|
||||
if(statusVar.size())
|
||||
if(!statusVar.empty())
|
||||
{
|
||||
std::ostringstream result;
|
||||
result << (int)0 << ";\"" << msg;
|
||||
@@ -3085,7 +3085,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
check_curl_result(res, "DOWNLOAD cannot set follow-redirect option: ");
|
||||
|
||||
if(verboseLog.size())
|
||||
if(!verboseLog.empty())
|
||||
{
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
check_curl_result(res, "DOWNLOAD cannot set verbose: ");
|
||||
@@ -3131,7 +3131,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
g_curl.release();
|
||||
::curl_easy_cleanup(curl);
|
||||
|
||||
if(statusVar.size())
|
||||
if(!statusVar.empty())
|
||||
{
|
||||
std::ostringstream result;
|
||||
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
||||
@@ -3172,14 +3172,14 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
}
|
||||
}
|
||||
|
||||
if(chunkDebug.size())
|
||||
if(!chunkDebug.empty())
|
||||
{
|
||||
chunkDebug.push_back(0);
|
||||
if(CURLE_OPERATION_TIMEOUTED == res)
|
||||
{
|
||||
std::string output = &*chunkDebug.begin();
|
||||
|
||||
if(verboseLog.size())
|
||||
if(!verboseLog.empty())
|
||||
{
|
||||
this->Makefile->AddDefinition(verboseLog,
|
||||
&*chunkDebug.begin());
|
||||
@@ -3335,7 +3335,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
check_curl_result(res, "UPLOAD cannot set follow-redirect option: ");
|
||||
|
||||
if(logVar.size())
|
||||
if(!logVar.empty())
|
||||
{
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
check_curl_result(res, "UPLOAD cannot set verbose: ");
|
||||
@@ -3390,7 +3390,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
g_curl.release();
|
||||
::curl_easy_cleanup(curl);
|
||||
|
||||
if(statusVar.size())
|
||||
if(!statusVar.empty())
|
||||
{
|
||||
std::ostringstream result;
|
||||
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
||||
@@ -3403,11 +3403,11 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
fclose(fin);
|
||||
fin = NULL;
|
||||
|
||||
if(logVar.size())
|
||||
if(!logVar.empty())
|
||||
{
|
||||
std::string log;
|
||||
|
||||
if(chunkResponse.size())
|
||||
if(!chunkResponse.empty())
|
||||
{
|
||||
chunkResponse.push_back(0);
|
||||
log += "Response:\n";
|
||||
@@ -3415,7 +3415,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
log += "\n";
|
||||
}
|
||||
|
||||
if(chunkDebug.size())
|
||||
if(!chunkDebug.empty())
|
||||
{
|
||||
chunkDebug.push_back(0);
|
||||
log += "Debug:\n";
|
||||
|
||||
Reference in New Issue
Block a user