Part: modernize C++11
* use nullptr
This commit is contained in:
@@ -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*/)
|
||||
|
||||
Reference in New Issue
Block a user