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 babddbe..36d4da4 100644
--- a/Source/cmCommandArgumentsHelper.cxx
+++ b/Source/cmCommandArgumentsHelper.cxx
@@ -11,11 +11,11 @@ cmCommandArgument::cmCommandArgument(cmCommandArgumentsHelper* args,
, ArgumentsBeforeEmpty(true)
, CurrentIndex(0)
{
- if (args != CM_NULLPTR) {
+ if (args != nullptr) {
args->AddArgument(this);
}
- if (this->Group != CM_NULLPTR) {
+ if (this->Group != nullptr) {
this->Group->ContainedArguments.push_back(this);
}
}
@@ -35,7 +35,7 @@ void cmCommandArgument::Follows(const cmCommandArgument* arg)
void cmCommandArgument::FollowsGroup(const cmCommandArgumentGroup* group)
{
- if (group != CM_NULLPTR) {
+ if (group != nullptr) {
this->ArgumentsBeforeEmpty = false;
this->ArgumentsBefore.insert(group->ContainedArguments.begin(),
group->ContainedArguments.end());
@@ -52,7 +52,7 @@ bool cmCommandArgument::MayFollow(const cmCommandArgument* current) const
bool cmCommandArgument::KeyMatches(const std::string& key) const
{
- if ((this->Key == CM_NULLPTR) || (this->Key[0] == '\0')) {
+ if ((this->Key == nullptr) || (this->Key[0] == '\0')) {
return true;
}
return (key == this->Key);
@@ -60,7 +60,7 @@ bool cmCommandArgument::KeyMatches(const std::string& key) const
void cmCommandArgument::ApplyOwnGroup()
{
- if (this->Group != CM_NULLPTR) {
+ if (this->Group != nullptr) {
for (std::vector<cmCommandArgument*>::const_iterator it =
this->Group->ContainedArguments.begin();
it != this->Group->ContainedArguments.end(); ++it) {
@@ -88,9 +88,9 @@ cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args,
const char* key,
cmCommandArgumentGroup* group)
: cmCommandArgument(args, key, group)
- , Ignore(CM_NULLPTR)
+ , Ignore(nullptr)
{
- if ((key == CM_NULLPTR) || (*key == 0)) {
+ if ((key == nullptr) || (*key == 0)) {
this->DataStart = 0;
} else {
this->DataStart = 1;
@@ -100,7 +100,7 @@ cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args,
bool cmCAStringVector::DoConsume(const std::string& arg, unsigned int index)
{
if (index >= this->DataStart) {
- if ((this->Ignore == CM_NULLPTR) || (arg != this->Ignore)) {
+ if ((this->Ignore == nullptr) || (arg != this->Ignore)) {
this->Vector.push_back(arg);
}
}
@@ -117,7 +117,7 @@ cmCAString::cmCAString(cmCommandArgumentsHelper* args, const char* key,
cmCommandArgumentGroup* group)
: cmCommandArgument(args, key, group)
{
- if ((key == CM_NULLPTR) || (*key == 0)) {
+ if ((key == nullptr) || (*key == 0)) {
this->DataStart = 0;
} else {
this->DataStart = 1;
@@ -199,7 +199,7 @@ void cmCommandArgumentGroup::FollowsGroup(const cmCommandArgumentGroup* group)
void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
std::vector<std::string>* unconsumedArgs)
{
- if (args == CM_NULLPTR) {
+ if (args == nullptr) {
return;
}
@@ -210,8 +210,8 @@ void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
(*argIt)->Reset();
}
- cmCommandArgument* activeArgument = CM_NULLPTR;
- const cmCommandArgument* previousArgument = CM_NULLPTR;
+ cmCommandArgument* activeArgument = nullptr;
+ const cmCommandArgument* previousArgument = nullptr;
for (std::vector<std::string>::const_iterator it = args->begin();
it != args->end(); ++it) {
for (std::vector<cmCommandArgument*>::iterator argIt =
@@ -229,10 +229,10 @@ void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
bool argDone = activeArgument->Consume(*it);
previousArgument = activeArgument;
if (argDone) {
- activeArgument = CM_NULLPTR;
+ activeArgument = nullptr;
}
} else {
- if (unconsumedArgs != CM_NULLPTR) {
+ if (unconsumedArgs != nullptr) {
unconsumedArgs->push_back(*it);
}
}