mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user