PD: modernize C++11
* use nullptr
This commit is contained in:
@@ -93,7 +93,7 @@ void ViewProviderHelix::unsetEdit(int ModNum)
|
||||
std::vector<App::DocumentObject*> ViewProviderHelix::claimChildren(void) const {
|
||||
std::vector<App::DocumentObject*> temp;
|
||||
App::DocumentObject* sketch = static_cast<PartDesign::ProfileBased*>(getObject())->Profile.getValue();
|
||||
if (sketch != NULL && sketch->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
if (sketch != nullptr && sketch->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
temp.push_back(sketch);
|
||||
|
||||
return temp;
|
||||
@@ -103,7 +103,7 @@ bool ViewProviderHelix::onDelete(const std::vector<std::string> &s) {
|
||||
PartDesign::ProfileBased* feature = static_cast<PartDesign::ProfileBased*>(getObject());
|
||||
|
||||
// get the Sketch
|
||||
Sketcher::SketchObject *pcSketch = 0;
|
||||
Sketcher::SketchObject *pcSketch = nullptr;
|
||||
if (feature->Profile.getValue())
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(feature->Profile.getValue());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user