summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-15 22:04:33 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-18 13:25:24 (GMT)
commitfd7b37129360364531ddfeda7edb6e34ba773d00 (patch)
tree701d9b298e1030b901a507b436e162810af3b8cc /Source/cmFileCommand.cxx
parentaa773035b7f4a1aefd860d0b9e80f134bd4a4547 (diff)
downloadCMake-fd7b37129360364531ddfeda7edb6e34ba773d00.zip
CMake-fd7b37129360364531ddfeda7edb6e34ba773d00.tar.gz
CMake-fd7b37129360364531ddfeda7edb6e34ba773d00.tar.bz2
Replace foo.size() pattern with !foo.empty().
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 416dd3e..aab256a 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -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";