Path: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 19:13:07 +01:00
parent b5c71395f1
commit 7b591da9f5
37 changed files with 163 additions and 163 deletions

View File

@@ -75,13 +75,13 @@ public:
instance = new PathSelectionObserver();
}
void setArrow(SoSwitch *pcSwitch=0) {
void setArrow(SoSwitch *pcSwitch=nullptr) {
if(pcSwitch==pcLastArrowSwitch)
return;
if(pcLastArrowSwitch) {
pcLastArrowSwitch->whichChild = -1;
pcLastArrowSwitch->unref();
pcLastArrowSwitch = 0;
pcLastArrowSwitch = nullptr;
}
if(pcSwitch) {
pcSwitch->ref();
@@ -102,7 +102,7 @@ public:
if(!obj)
return;
Base::Matrix4D mat;
auto sobj = obj->getSubObject(msg.pSubName,0,&mat);
auto sobj = obj->getSubObject(msg.pSubName,nullptr,&mat);
if(!sobj)
return;
Base::Matrix4D linkMat;
@@ -131,7 +131,7 @@ public:
setArrow();
}
SoSwitch *pcLastArrowSwitch = 0;
SoSwitch *pcLastArrowSwitch = nullptr;
};
}
@@ -229,7 +229,7 @@ ViewProviderPath::ViewProviderPath()
DisplayMode.setStatus(App::Property::Status::Hidden, true);
static const char *SelectionStyleEnum[] = {"Shape","BoundBox","None",0};
static const char *SelectionStyleEnum[] = {"Shape","BoundBox","None",nullptr};
SelectionStyle.setEnums(SelectionStyleEnum);
unsigned long sstyle = hGrp->GetInt("DefaultSelectionStyle",0);
SelectionStyle.setValue(sstyle);
@@ -325,7 +325,7 @@ std::string ViewProviderPath::getElement(const SoDetail* detail) const
SoDetail* ViewProviderPath::getDetail(const char* subelement) const
{
int index = std::atoi(subelement);
SoDetail* detail = 0;
SoDetail* detail = nullptr;
if (index>0 && index<=(int)command2Edge.size()) {
index = command2Edge[index-1];
if(index>=0 && edgeStart>=0 && edgeStart<=index) {
@@ -521,7 +521,7 @@ public:
{
(void)last;
gx(id, NULL, pts, 0);
gx(id, nullptr, pts, 0);
points.push_back(p[0]);
markers.push_back(p[0]);
@@ -581,7 +581,7 @@ private:
colorindex.push_back(color);
}
if (next != NULL) {
if (next != nullptr) {
points.push_back(*next);
markers.push_back(*next);
colorindex.push_back(color);