summaryrefslogtreecommitdiff
path: root/Source/cmCommandArgumentsHelper.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-27 22:44:16 +0200
committerBrad King <brad.king@kitware.com>2016-06-28 09:02:26 -0400
commit1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb (patch)
tree3c13e63f2529d877b865475b5269a96ef5e0a4cb /Source/cmCommandArgumentsHelper.cxx
parentb4b73f56a26c1e1d630e3f262d2d4bafee8231c4 (diff)
downloadcmake-1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb.tar.gz
use CM_NULLPTR
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 c336bc53b3..1345bd5e9d 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);
}
}