PD: modernize C++11
* use nullptr
This commit is contained in:
@@ -42,7 +42,7 @@ std::string BodyPy::representation(void) const
|
||||
|
||||
PyObject *BodyPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int BodyPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
@@ -57,7 +57,7 @@ PyObject* BodyPy::insertObject(PyObject *args)
|
||||
PyObject* afterPy = Py_False;
|
||||
if (!PyArg_ParseTuple(args, "O!O|O!", &(App::DocumentObjectPy::Type), &featurePy,
|
||||
&targetPy, &PyBool_Type, &afterPy)) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
App::DocumentObject* feature = static_cast<App::DocumentObjectPy*>(featurePy)->getDocumentObjectPtr();
|
||||
@@ -68,7 +68,7 @@ PyObject* BodyPy::insertObject(PyObject *args)
|
||||
|
||||
if (!Body::isAllowed(feature)) {
|
||||
PyErr_SetString(PyExc_SystemError, "Only PartDesign features, datum features and sketches can be inserted into a Body");
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool after = PyObject_IsTrue(afterPy) ? true : false;
|
||||
@@ -79,7 +79,7 @@ PyObject* BodyPy::insertObject(PyObject *args)
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
PyErr_SetString(PyExc_SystemError, e.what());
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
|
||||
Reference in New Issue
Block a user