Part: modernize C++11

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

View File

@@ -21,16 +21,16 @@ std::string AttachExtensionPy::representation(void) const
PyObject* AttachExtensionPy::positionBySupport(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return 0;
return nullptr;
bool bAttached = false;
try{
bAttached = this->getAttachExtensionPtr()->positionBySupport();
} catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return NULL;
return nullptr;
} catch (Base::Exception &e) {
e.setPyException();
return NULL;
return nullptr;
}
return Py::new_reference_to(Py::Boolean(bAttached));
}
@@ -39,16 +39,16 @@ PyObject* AttachExtensionPy::changeAttacherType(PyObject *args)
{
const char* typeName;
if (!PyArg_ParseTuple(args, "s", &typeName))
return 0;
return nullptr;
bool ret;
try{
ret = this->getAttachExtensionPtr()->changeAttacherType(typeName);
} catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return NULL;
return nullptr;
} catch (Base::Exception &e) {
e.setPyException();
return NULL;
return nullptr;
}
return Py::new_reference_to(Py::Boolean(ret));
}
@@ -74,7 +74,7 @@ Py::Object AttachExtensionPy::getAttacher(void) const
PyObject *AttachExtensionPy::getCustomAttributes(const char* /*attr*/) const
{
return 0;
return nullptr;
}
int AttachExtensionPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)