Path: modernize C++11
* use nullptr
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user