use empty method to check for emptyness
This commit is contained in:
parent
6e06a53ebf
commit
73f648f167
|
@ -14,7 +14,7 @@
|
||||||
bool cmAddCompileOptionsCommand::InitialPass(
|
bool cmAddCompileOptionsCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
bool cmAddCustomTargetCommand::InitialPass(
|
bool cmAddCustomTargetCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
// it is OK to have no arguments
|
// it is OK to have no arguments
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmAddSubDirectoryCommand::InitialPass(
|
bool cmAddSubDirectoryCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ bool cmBuildCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
|
|
||||||
bool cmBuildCommand::MainSignature(std::vector<std::string> const& args)
|
bool cmBuildCommand::MainSignature(std::vector<std::string> const& args)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("requires at least one argument naming a CMake variable");
|
this->SetError("requires at least one argument naming a CMake variable");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
"The build_name command should not be called; see CMP0036.")) {
|
"The build_name command should not be called; see CMP0036.")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
bool cmCMakePolicyCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmCMakePolicyCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("requires at least one argument.");
|
this->SetError("requires at least one argument.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ bool cmConditionEvaluator::IsTrue(
|
||||||
errorString = "";
|
errorString = "";
|
||||||
|
|
||||||
// handle empty invocation
|
// handle empty invocation
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
bool cmDefinePropertyCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmDefinePropertyCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ bool cmEnableLanguageCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
{
|
{
|
||||||
bool optional = false;
|
bool optional = false;
|
||||||
std::vector<std::string> languages;
|
std::vector<std::string> languages;
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ void cmExecuteProcessCommandAppend(std::vector<char>& output, const char* data,
|
||||||
bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
|
||||||
const ImportPropertyMap& properties)
|
const ImportPropertyMap& properties)
|
||||||
{
|
{
|
||||||
std::string config = "";
|
std::string config = "";
|
||||||
if (this->Configurations.size()) {
|
if (!this->Configurations.empty()) {
|
||||||
config = this->Configurations[0];
|
config = this->Configurations[0];
|
||||||
}
|
}
|
||||||
cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
|
cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
|
||||||
|
|
|
@ -76,7 +76,7 @@ void cmExportInstallAndroidMKGenerator::GenerateImportTargetCode(
|
||||||
os << "LOCAL_SRC_FILES := $(_IMPORT_PREFIX)/";
|
os << "LOCAL_SRC_FILES := $(_IMPORT_PREFIX)/";
|
||||||
os << target->Target->GetProperty("__dest") << "/";
|
os << target->Target->GetProperty("__dest") << "/";
|
||||||
std::string config = "";
|
std::string config = "";
|
||||||
if (this->Configurations.size()) {
|
if (!this->Configurations.empty()) {
|
||||||
config = this->Configurations[0];
|
config = this->Configurations[0];
|
||||||
}
|
}
|
||||||
os << target->GetFullName(config) << "\n";
|
os << target->GetFullName(config) << "\n";
|
||||||
|
@ -103,7 +103,7 @@ void cmExportInstallAndroidMKGenerator::GenerateInterfaceProperties(
|
||||||
const ImportPropertyMap& properties)
|
const ImportPropertyMap& properties)
|
||||||
{
|
{
|
||||||
std::string config = "";
|
std::string config = "";
|
||||||
if (this->Configurations.size()) {
|
if (!this->Configurations.empty()) {
|
||||||
config = this->Configurations[0];
|
config = this->Configurations[0];
|
||||||
}
|
}
|
||||||
cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
|
cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
|
||||||
|
|
|
@ -27,7 +27,7 @@ bool cmExportLibraryDependenciesCommand::InitialPass(
|
||||||
"see CMP0033.")) {
|
"see CMP0033.")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ void cmFindPackageCommand::AppendSearchPathGroups()
|
||||||
bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ bool cmForEachFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
|
||||||
bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,7 +202,7 @@ bool cmFunctionFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
|
||||||
bool cmFunctionCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmFunctionCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1 || args.size() > 4) {
|
if (args.empty() || args.size() > 4) {
|
||||||
this->SetError("called with wrong number of arguments. "
|
this->SetError("called with wrong number of arguments. "
|
||||||
"include() only takes one file.");
|
"include() only takes one file.");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmIncludeDirectoryCommand::InitialPass(
|
bool cmIncludeDirectoryCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmIncludeRegularExpressionCommand::InitialPass(
|
bool cmIncludeRegularExpressionCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if ((args.size() < 1) || (args.size() > 2)) {
|
if ((args.empty()) || (args.size() > 2)) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmLinkDirectoriesCommand::InitialPass(
|
bool cmLinkDirectoriesCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// add libraries, nothe that there is an optional prefix
|
// add libraries, nothe that there is an optional prefix
|
||||||
|
|
|
@ -167,10 +167,10 @@ public:
|
||||||
|
|
||||||
iterator Truncate()
|
iterator Truncate()
|
||||||
{
|
{
|
||||||
assert(this->UpPositions.size() > 0);
|
assert(!this->UpPositions.empty());
|
||||||
this->UpPositions.erase(this->UpPositions.begin() + 1,
|
this->UpPositions.erase(this->UpPositions.begin() + 1,
|
||||||
this->UpPositions.end());
|
this->UpPositions.end());
|
||||||
assert(this->Data.size() > 0);
|
assert(!this->Data.empty());
|
||||||
this->Data.erase(this->Data.begin() + 1, this->Data.end());
|
this->Data.erase(this->Data.begin() + 1, this->Data.end());
|
||||||
return iterator(this, 1);
|
return iterator(this, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with wrong number of arguments.");
|
this->SetError("called with wrong number of arguments.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
"The load_command command should not be called; see CMP0031.")) {
|
"The load_command command should not be called; see CMP0031.")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,7 @@ bool cmMacroFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
|
||||||
bool cmMacroCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmMacroCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
bool cmMathCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmMathCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("must be called with at least one argument.");
|
this->SetError("must be called with at least one argument.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
bool cmMessageCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmMessageCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("PROJECT called with incorrect number of arguments");
|
this->SetError("PROJECT called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmRemoveCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmRemoveCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ bool cmRemoveDefinitionsCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
// it is OK to have no arguments
|
// it is OK to have no arguments
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
bool cmSetDirectoryPropertiesCommand::InitialPass(
|
bool cmSetDirectoryPropertiesCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
bool cmSetTestsPropertiesCommand::InitialPass(
|
bool cmSetTestsPropertiesCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
bool cmStringCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmStringCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("must be called with at least one argument.");
|
this->SetError("must be called with at least one argument.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmSubdirCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmSubdirCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass(
|
||||||
std::vector<std::string> const& args, cmExecutionStatus&)
|
std::vector<std::string> const& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
// must have one argument
|
// must have one argument
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
bool cmUnsetCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmUnsetCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1 || args.size() > 2) {
|
if (args.empty() || args.size() > 2) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ cmVariableWatchCommand::~cmVariableWatchCommand()
|
||||||
bool cmVariableWatchCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmVariableWatchCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("must be called with at least one argument.");
|
this->SetError("must be called with at least one argument.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ bool cmWhileFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
|
||||||
bool cmWhileCommand::InvokeInitialPass(
|
bool cmWhileCommand::InvokeInitialPass(
|
||||||
const std::vector<cmListFileArgument>& args, cmExecutionStatus&)
|
const std::vector<cmListFileArgument>& args, cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
if (args.size() < 1) {
|
if (args.empty()) {
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue