Sketcher: modernize C++11
* use nullptr
This commit is contained in:
@@ -120,7 +120,7 @@ SketcherGui::ViewProviderSketch* getSketchViewprovider(Gui::Document *doc)
|
||||
(SketcherGui::ViewProviderSketch::getClassTypeId()) )
|
||||
return dynamic_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void removeRedundantHorizontalVertical(Sketcher::SketchObject* psketch,
|
||||
@@ -5686,7 +5686,7 @@ namespace SketcherGui {
|
||||
App::DocumentObject* object;
|
||||
public:
|
||||
FilletSelection(App::DocumentObject* obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), object(obj)
|
||||
{}
|
||||
|
||||
bool allow(App::Document * /*pDoc*/, App::DocumentObject *pObj, const char *sSubName)
|
||||
@@ -6099,7 +6099,7 @@ namespace SketcherGui {
|
||||
App::DocumentObject* object;
|
||||
public:
|
||||
TrimmingSelection(App::DocumentObject* obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), object(obj)
|
||||
{}
|
||||
|
||||
bool allow(App::Document * /*pDoc*/, App::DocumentObject *pObj, const char *sSubName)
|
||||
@@ -6262,7 +6262,7 @@ namespace SketcherGui {
|
||||
App::DocumentObject* object;
|
||||
public:
|
||||
ExtendSelection(App::DocumentObject* obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr)
|
||||
, object(obj)
|
||||
, disabled(false)
|
||||
{}
|
||||
@@ -6577,7 +6577,7 @@ namespace SketcherGui {
|
||||
App::DocumentObject* object;
|
||||
public:
|
||||
SplittingSelection(App::DocumentObject* obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), object(obj)
|
||||
{}
|
||||
|
||||
bool allow(App::Document * /*pDoc*/, App::DocumentObject *pObj, const char *sSubName)
|
||||
@@ -6695,7 +6695,7 @@ namespace SketcherGui {
|
||||
App::DocumentObject* object;
|
||||
public:
|
||||
ExternalSelection(App::DocumentObject* obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), object(obj)
|
||||
{}
|
||||
|
||||
bool allow(App::Document *pDoc, App::DocumentObject *pObj, const char *sSubName)
|
||||
@@ -6785,7 +6785,7 @@ public:
|
||||
{
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection) {
|
||||
App::DocumentObject* obj = sketchgui->getObject()->getDocument()->getObject(msg.pObjectName);
|
||||
if (obj == NULL)
|
||||
if (obj == nullptr)
|
||||
throw Base::ValueError("Sketcher: External geometry: Invalid object in selection");
|
||||
std::string subName(msg.pSubName);
|
||||
if (obj->getTypeId().isDerivedFrom(App::Plane::getClassTypeId()) ||
|
||||
@@ -6882,7 +6882,7 @@ namespace SketcherGui {
|
||||
App::DocumentObject* object;
|
||||
public:
|
||||
CarbonCopySelection(App::DocumentObject* obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), object(obj)
|
||||
{}
|
||||
|
||||
bool allow(App::Document *pDoc, App::DocumentObject *pObj, const char *sSubName)
|
||||
@@ -6971,7 +6971,7 @@ public:
|
||||
{
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection) {
|
||||
App::DocumentObject* obj = sketchgui->getObject()->getDocument()->getObject(msg.pObjectName);
|
||||
if (obj == NULL)
|
||||
if (obj == nullptr)
|
||||
throw Base::ValueError("Sketcher: Carbon Copy: Invalid object in selection");
|
||||
|
||||
if (obj->getTypeId() == Sketcher::SketchObject::getClassTypeId()) {
|
||||
|
||||
Reference in New Issue
Block a user