Replace !foo.size() pattern with foo.empty().
This commit is contained in:
parent
6459263377
commit
aa773035b7
|
@ -193,7 +193,7 @@ public:
|
||||||
int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
|
int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
|
||||||
{
|
{
|
||||||
// if the generator and make program are not specified then it is an error
|
// if the generator and make program are not specified then it is an error
|
||||||
if (!this->BuildGenerator.size())
|
if (this->BuildGenerator.empty())
|
||||||
{
|
{
|
||||||
if(outstring)
|
if(outstring)
|
||||||
{
|
{
|
||||||
|
@ -329,7 +329,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no test was specified then we are done
|
// if no test was specified then we are done
|
||||||
if (!this->TestCommand.size())
|
if (this->TestCommand.empty())
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1311,7 +1311,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||||
//TODO: Handle gcov 3.0 non-coverage lines
|
//TODO: Handle gcov 3.0 non-coverage lines
|
||||||
|
|
||||||
// Skip empty lines
|
// Skip empty lines
|
||||||
if ( !nl.size() )
|
if (nl.empty())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1627,7 +1627,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
||||||
cnt ++;
|
cnt ++;
|
||||||
|
|
||||||
// Skip empty lines
|
// Skip empty lines
|
||||||
if ( !nl.size() )
|
if (nl.empty())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1813,7 +1813,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
||||||
cnt ++;
|
cnt ++;
|
||||||
|
|
||||||
// Skip empty lines
|
// Skip empty lines
|
||||||
if ( !nl.size() )
|
if (nl.empty())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -812,8 +812,8 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
|
||||||
const std::string& remoteprefix,
|
const std::string& remoteprefix,
|
||||||
const std::string& url)
|
const std::string& url)
|
||||||
{
|
{
|
||||||
if ( !scp_command.size() || !localprefix.size() ||
|
if ( scp_command.empty() || localprefix.empty() ||
|
||||||
!files.size() || !remoteprefix.size() || !url.size() )
|
files.empty() || remoteprefix.empty() || url.empty() )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -912,8 +912,8 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
|
||||||
const std::string& remoteprefix,
|
const std::string& remoteprefix,
|
||||||
const std::string& destination)
|
const std::string& destination)
|
||||||
{
|
{
|
||||||
if ( !localprefix.size() ||
|
if ( localprefix.empty() ||
|
||||||
!files.size() || !remoteprefix.size() || !destination.size() )
|
files.empty() || remoteprefix.empty() || destination.empty() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Missing arguments for submit via cp:\n"
|
"Missing arguments for submit via cp:\n"
|
||||||
|
|
|
@ -37,7 +37,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
||||||
excludeFromAll = true;
|
excludeFromAll = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!binArg.size())
|
else if (binArg.empty())
|
||||||
{
|
{
|
||||||
binArg = *i;
|
binArg = *i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -597,7 +597,7 @@ void cmGlobalUnixMakefileGenerator3
|
||||||
tname = lg->Convert(tname,cmLocalGenerator::HOME_OUTPUT);
|
tname = lg->Convert(tname,cmLocalGenerator::HOME_OUTPUT);
|
||||||
cmSystemTools::ConvertToOutputSlashes(tname);
|
cmSystemTools::ConvertToOutputSlashes(tname);
|
||||||
makeCommand.push_back(tname);
|
makeCommand.push_back(tname);
|
||||||
if (!this->LocalGenerators.size())
|
if (this->LocalGenerators.empty())
|
||||||
{
|
{
|
||||||
delete lg;
|
delete lg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -523,7 +523,7 @@ cmInstallTargetGenerator
|
||||||
std::string installNameTool =
|
std::string installNameTool =
|
||||||
this->Target->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_NAME_TOOL");
|
this->Target->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_NAME_TOOL");
|
||||||
|
|
||||||
if(!installNameTool.size())
|
if(installNameTool.empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -898,7 +898,7 @@ bool cmStringCommand
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !alphabet.size() )
|
if (alphabet.empty())
|
||||||
{
|
{
|
||||||
alphabet = cmStringCommandDefaultAlphabet;
|
alphabet = cmStringCommandDefaultAlphabet;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue