summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandArgumentsHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCommandArgumentsHelper.cxx')
-rw-r--r--Source/cmCommandArgumentsHelper.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/cmCommandArgumentsHelper.cxx b/Source/cmCommandArgumentsHelper.cxx
index c336bc5..1345bd5 100644
--- a/Source/cmCommandArgumentsHelper.cxx
+++ b/Source/cmCommandArgumentsHelper.cxx
@@ -21,11 +21,11 @@ cmCommandArgument::cmCommandArgument(cmCommandArgumentsHelper* args,
, ArgumentsBeforeEmpty(true)
, CurrentIndex(0)
{
- if (args != 0) {
+ if (args != CM_NULLPTR) {
args->AddArgument(this);
}
- if (this->Group != 0) {
+ if (this->Group != CM_NULLPTR) {
this->Group->ContainedArguments.push_back(this);
}
}
@@ -45,7 +45,7 @@ void cmCommandArgument::Follows(const cmCommandArgument* arg)
void cmCommandArgument::FollowsGroup(const cmCommandArgumentGroup* group)
{
- if (group != 0) {
+ if (group != CM_NULLPTR) {
this->ArgumentsBeforeEmpty = false;
this->ArgumentsBefore.insert(group->ContainedArguments.begin(),
group->ContainedArguments.end());
@@ -69,7 +69,7 @@ bool cmCommandArgument::MayFollow(const cmCommandArgument* current) const
bool cmCommandArgument::KeyMatches(const std::string& key) const
{
- if ((this->Key == 0) || (this->Key[0] == '\0')) {
+ if ((this->Key == CM_NULLPTR) || (this->Key[0] == '\0')) {
return true;
}
return (key == this->Key);
@@ -77,7 +77,7 @@ bool cmCommandArgument::KeyMatches(const std::string& key) const
void cmCommandArgument::ApplyOwnGroup()
{
- if (this->Group != 0) {
+ if (this->Group != CM_NULLPTR) {
for (std::vector<cmCommandArgument*>::const_iterator it =
this->Group->ContainedArguments.begin();
it != this->Group->ContainedArguments.end(); ++it) {
@@ -105,9 +105,9 @@ cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args,
const char* key,
cmCommandArgumentGroup* group)
: cmCommandArgument(args, key, group)
- , Ignore(0)
+ , Ignore(CM_NULLPTR)
{
- if ((key == 0) || (*key == 0)) {
+ if ((key == CM_NULLPTR) || (*key == 0)) {
this->DataStart = 0;
} else {
this->DataStart = 1;
@@ -117,7 +117,7 @@ cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args,
bool cmCAStringVector::DoConsume(const std::string& arg, unsigned int index)
{
if (index >= this->DataStart) {
- if ((this->Ignore == 0) || (arg != this->Ignore)) {
+ if ((this->Ignore == CM_NULLPTR) || (arg != this->Ignore)) {
this->Vector.push_back(arg);
}
}
@@ -134,7 +134,7 @@ cmCAString::cmCAString(cmCommandArgumentsHelper* args, const char* key,
cmCommandArgumentGroup* group)
: cmCommandArgument(args, key, group)
{
- if ((key == 0) || (*key == 0)) {
+ if ((key == CM_NULLPTR) || (*key == 0)) {
this->DataStart = 0;
} else {
this->DataStart = 1;
@@ -216,7 +216,7 @@ void cmCommandArgumentGroup::FollowsGroup(const cmCommandArgumentGroup* group)
void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
std::vector<std::string>* unconsumedArgs)
{
- if (args == 0) {
+ if (args == CM_NULLPTR) {
return;
}
@@ -227,8 +227,8 @@ void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
(*argIt)->Reset();
}
- cmCommandArgument* activeArgument = 0;
- const cmCommandArgument* previousArgument = 0;
+ cmCommandArgument* activeArgument = CM_NULLPTR;
+ const cmCommandArgument* previousArgument = CM_NULLPTR;
for (std::vector<std::string>::const_iterator it = args->begin();
it != args->end(); ++it) {
for (std::vector<cmCommandArgument*>::iterator argIt =
@@ -246,10 +246,10 @@ void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
bool argDone = activeArgument->Consume(*it);
previousArgument = activeArgument;
if (argDone) {
- activeArgument = 0;
+ activeArgument = CM_NULLPTR;
}
} else {
- if (unconsumedArgs != 0) {
+ if (unconsumedArgs != CM_NULLPTR) {
unconsumedArgs->push_back(*it);
}
}