Part: modernize C++11
* use nullptr
This commit is contained in:
@@ -111,7 +111,7 @@ PyObject* PointPy::toShape(PyObject *args)
|
||||
try {
|
||||
if (!this_point.IsNull()) {
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
BRepBuilderAPI_MakeVertex mkBuilder(this_point->Pnt());
|
||||
const TopoDS_Vertex& sh = mkBuilder.Vertex();
|
||||
@@ -121,11 +121,11 @@ PyObject* PointPy::toShape(PyObject *args)
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, "Geometry is not a point");
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Py::Float PointPy::getX(void) const
|
||||
@@ -191,7 +191,7 @@ void PointPy::setZ(Py::Float Z)
|
||||
|
||||
PyObject *PointPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int PointPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
|
||||
Reference in New Issue
Block a user