App: modernize C++11
* use nullptr
This commit is contained in:
@@ -136,7 +136,7 @@ void FeaturePythonImp::onBeforeChange(const Property* prop)
|
||||
Base::PyGILStateLocker lock;
|
||||
try {
|
||||
const char *prop_name = object->getPropertyName(prop);
|
||||
if(prop_name == 0)
|
||||
if(prop_name == nullptr)
|
||||
return;
|
||||
if (has__object__) {
|
||||
Py::Tuple args(1);
|
||||
@@ -190,7 +190,7 @@ void FeaturePythonImp::onChanged(const Property* prop)
|
||||
Base::PyGILStateLocker lock;
|
||||
try {
|
||||
const char *prop_name = object->getPropertyName(prop);
|
||||
if(prop_name == 0)
|
||||
if(prop_name == nullptr)
|
||||
return;
|
||||
if (has__object__) {
|
||||
Py::Tuple args(1);
|
||||
@@ -251,7 +251,7 @@ bool FeaturePythonImp::getSubObject(DocumentObject *&ret, const char *subname,
|
||||
|
||||
Py::Object res(Base::pyCall(py_getSubObject.ptr(),args.ptr()));
|
||||
if(res.isNone()) {
|
||||
ret = 0;
|
||||
ret = nullptr;
|
||||
return true;
|
||||
}
|
||||
if(!res.isTrue())
|
||||
@@ -275,7 +275,7 @@ bool FeaturePythonImp::getSubObject(DocumentObject *&ret, const char *subname,
|
||||
*pyObj = Py::new_reference_to(Py::None());
|
||||
}
|
||||
if(seq.getItem(0).isNone())
|
||||
ret = 0;
|
||||
ret = nullptr;
|
||||
else
|
||||
ret = static_cast<DocumentObjectPy*>(seq.getItem(0).ptr())->getDocumentObjectPtr();
|
||||
return true;
|
||||
@@ -287,7 +287,7 @@ bool FeaturePythonImp::getSubObject(DocumentObject *&ret, const char *subname,
|
||||
}
|
||||
Base::PyException e; // extract the Python error text
|
||||
e.ReportException();
|
||||
ret = 0;
|
||||
ret = nullptr;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -369,7 +369,7 @@ bool FeaturePythonImp::getLinkedObject(DocumentObject *&ret, bool recurse,
|
||||
}
|
||||
Base::PyException e; // extract the Python error text
|
||||
e.ReportException();
|
||||
ret = 0;
|
||||
ret = nullptr;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user