Part: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 19:06:48 +01:00
parent f265c15ac0
commit 068c0e5a98
155 changed files with 1504 additions and 1504 deletions

View File

@@ -98,7 +98,7 @@ PyObject* TopoShapeCompoundPy::add(PyObject *args)
{
PyObject *obj;
if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapePy::Type), &obj))
return NULL;
return nullptr;
BRep_Builder builder;
TopoDS_Shape comp = getTopoShapePtr()->getShape();
@@ -112,7 +112,7 @@ PyObject* TopoShapeCompoundPy::add(PyObject *args)
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return 0;
return nullptr;
}
getTopoShapePtr()->setShape(comp);
@@ -125,7 +125,7 @@ PyObject* TopoShapeCompoundPy::connectEdgesToWires(PyObject *args)
PyObject *shared=Py_True;
double tol = Precision::Confusion();
if (!PyArg_ParseTuple(args, "|O!d",&PyBool_Type,&shared,&tol))
return 0;
return nullptr;
try {
const TopoDS_Shape& s = getTopoShapePtr()->getShape();
@@ -152,13 +152,13 @@ PyObject* TopoShapeCompoundPy::connectEdgesToWires(PyObject *args)
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return 0;
return nullptr;
}
}
PyObject *TopoShapeCompoundPy::getCustomAttributes(const char* /*attr*/) const
{
return 0;
return nullptr;
}
int TopoShapeCompoundPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)