Gui: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 18:41:21 +01:00
parent be7e18757c
commit 1178df06b4
239 changed files with 1197 additions and 1197 deletions

View File

@@ -952,17 +952,17 @@ class SoBoxSelectionRenderActionP {
public:
SoBoxSelectionRenderActionP(SoBoxSelectionRenderAction * master)
: master(master)
, searchaction(0)
, selectsearch(0)
, camerasearch(0)
, bboxaction(0)
, basecolor(0)
, postprocpath(0)
, highlightPath(0)
, localRoot(0)
, xform(0)
, cube(0)
, drawstyle(0)
, searchaction(nullptr)
, selectsearch(nullptr)
, camerasearch(nullptr)
, bboxaction(nullptr)
, basecolor(nullptr)
, postprocpath(nullptr)
, highlightPath(nullptr)
, localRoot(nullptr)
, xform(nullptr)
, cube(nullptr)
, drawstyle(nullptr)
{
}
@@ -1030,7 +1030,7 @@ SoBoxSelectionRenderActionP::initBoxGraph()
void
SoBoxSelectionRenderActionP::updateBbox(const SoPath * path)
{
if (this->camerasearch == NULL) {
if (this->camerasearch == nullptr) {
this->camerasearch = new SoSearchAction;
}
@@ -1047,7 +1047,7 @@ SoBoxSelectionRenderActionP::updateBbox(const SoPath * path)
this->localRoot->insertChild(this->camerasearch->getPath()->getTail(), 0);
this->camerasearch->reset();
if (this->bboxaction == NULL) {
if (this->bboxaction == nullptr) {
this->bboxaction = new SoGetBoundingBoxAction(SbViewportRegion(100, 100));
}
this->bboxaction->setViewportRegion(PUBLIC(this)->getViewportRegion());
@@ -1122,15 +1122,15 @@ SoBoxSelectionRenderAction::constructorCommon(void)
PRIVATE(this)->basecolor->rgb.setValue(1.0f, 0.0f, 0.0f);
PRIVATE(this)->drawstyle->linePattern = 0xffff;
PRIVATE(this)->drawstyle->lineWidth = 1.0f;
PRIVATE(this)->searchaction = NULL;
PRIVATE(this)->selectsearch = NULL;
PRIVATE(this)->camerasearch = NULL;
PRIVATE(this)->bboxaction = NULL;
PRIVATE(this)->searchaction = nullptr;
PRIVATE(this)->selectsearch = nullptr;
PRIVATE(this)->camerasearch = nullptr;
PRIVATE(this)->bboxaction = nullptr;
// SoBase-derived objects should be dynamically allocated.
PRIVATE(this)->postprocpath = new SoTempPath(32);
PRIVATE(this)->postprocpath->ref();
PRIVATE(this)->highlightPath = 0;
PRIVATE(this)->highlightPath = nullptr;
}
SoBoxSelectionRenderAction::~SoBoxSelectionRenderAction(void)
@@ -1154,7 +1154,7 @@ SoBoxSelectionRenderAction::apply(SoNode * node)
{
SoGLRenderAction::apply(node);
if (this->hlVisible) {
if (PRIVATE(this)->searchaction == NULL) {
if (PRIVATE(this)->searchaction == nullptr) {
PRIVATE(this)->searchaction = new SoSearchAction;
}
PRIVATE(this)->searchaction->setType(SoFCSelection::getClassTypeId());
@@ -1169,7 +1169,7 @@ SoBoxSelectionRenderAction::apply(SoNode * node)
assert(selection->getTypeId().isDerivedFrom(SoFCSelection::getClassTypeId()));
if (selection->selected.getValue() && selection->style.getValue() == SoFCSelection::BOX) {
PRIVATE(this)->basecolor->rgb.setValue(selection->colorSelection.getValue());
if (PRIVATE(this)->selectsearch == NULL) {
if (PRIVATE(this)->selectsearch == nullptr) {
PRIVATE(this)->selectsearch = new SoSearchAction;
}
PRIVATE(this)->selectsearch->setType(SoShape::getClassTypeId());
@@ -1188,7 +1188,7 @@ SoBoxSelectionRenderAction::apply(SoNode * node)
selection->style.getValue() == SoFCSelection::BOX) {
PRIVATE(this)->basecolor->rgb.setValue(selection->colorHighlight.getValue());
if (PRIVATE(this)->selectsearch == NULL) {
if (PRIVATE(this)->selectsearch == nullptr) {
PRIVATE(this)->selectsearch = new SoSearchAction;
}
PRIVATE(this)->selectsearch->setType(SoShape::getClassTypeId());
@@ -1225,7 +1225,7 @@ SoBoxSelectionRenderAction::apply(SoPath * path)
// This happens when dehighlighting the current shape
if (PRIVATE(this)->highlightPath == path) {
PRIVATE(this)->highlightPath->unref();
PRIVATE(this)->highlightPath = 0;
PRIVATE(this)->highlightPath = nullptr;
// FIXME: Doing a redraw to remove the shown bounding box causes
// some problems when moving the mouse from one shape to another
// because this will destroy the box immediately
@@ -1236,7 +1236,7 @@ SoBoxSelectionRenderAction::apply(SoPath * path)
selection->style.getValue() == SoFCSelection::BOX) {
PRIVATE(this)->basecolor->rgb.setValue(selection->colorHighlight.getValue());
if (PRIVATE(this)->selectsearch == NULL) {
if (PRIVATE(this)->selectsearch == nullptr) {
PRIVATE(this)->selectsearch = new SoSearchAction;
}
PRIVATE(this)->selectsearch->setType(SoShape::getClassTypeId());