Fix GCC warnings: catching polymorphic type by value [-Wcatch-value=]
This commit is contained in:
committed by
abdullahtahiriyo
parent
c89e6eec13
commit
90c4ffceec
@@ -259,7 +259,7 @@ PyObject* GeometryPy::getExtensionOfType(PyObject *args)
|
||||
PyErr_SetString(PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -296,7 +296,7 @@ PyObject* GeometryPy::getExtensionOfName(PyObject *args)
|
||||
PyErr_SetString(PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -425,7 +425,7 @@ PyObject* GeometryPy::getExtensions(PyObject *args)
|
||||
try {
|
||||
list.append(Py::asObject(p->copyPyObject()));
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
// silently ignoring extensions not having a Python object
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user