C++11: Replaced the C NULL with the safer C++11 nullptr

Requires gcc version 4.7 or higher
This commit is contained in:
Henry Weller
2016-08-05 17:19:38 +01:00
parent 7996a9138f
commit 58f905ff70
363 changed files with 1468 additions and 1416 deletions

View File

@ -33,8 +33,8 @@ Foam::splitCell::splitCell(const label celli, splitCell* parent)
:
celli_(celli),
parent_(parent),
master_(NULL),
slave_(NULL)
master_(nullptr),
slave_(nullptr)
{}
@ -49,11 +49,11 @@ Foam::splitCell::~splitCell()
// Make sure parent does not refer to me anymore.
if (myParent->master() == this)
{
myParent->master() = NULL;
myParent->master() = nullptr;
}
else if (myParent->slave() == this)
{
myParent->slave() = NULL;
myParent->slave() = nullptr;
}
else
{
@ -112,7 +112,7 @@ Foam::splitCell* Foam::splitCell::getOther() const
FatalErrorInFunction
<< "Cell:" << cellLabel() << abort(FatalError);
return NULL;
return nullptr;
}
else if (myParent->master() == this)
{
@ -128,7 +128,7 @@ Foam::splitCell* Foam::splitCell::getOther() const
<< " parent's master or slave pointer" << endl
<< "Cell:" << cellLabel() << abort(FatalError);
return NULL;
return nullptr;
}
}