Base: replace several reinterpret_cast

This commit is contained in:
wmayer
2022-05-11 20:01:40 +02:00
parent e0116c271a
commit b39c6f62b4
7 changed files with 56 additions and 59 deletions

View File

@@ -91,14 +91,12 @@ int BoundBoxPy::PyInit(PyObject* args, PyObject* /*kwd*/)
PyErr_Clear(); // set by PyArg_ParseTuple()
if (PyArg_ParseTuple(args,"O!O!",&(Base::VectorPy::Type), &object1,
&(Base::VectorPy::Type), &object2)) {
// Note: must be static_cast, not reinterpret_cast
ptr->Add(*(static_cast<Base::VectorPy*>(object1)->getVectorPtr()));
ptr->Add(*(static_cast<Base::VectorPy*>(object2)->getVectorPtr()));
return 0;
}
PyErr_Clear(); // set by PyArg_ParseTuple()
if (PyArg_ParseTuple(args,"O!",&(Base::BoundBoxPy::Type), &object1)) {
// Note: must be static_cast, not reinterpret_cast
*ptr = *(static_cast<Base::BoundBoxPy*>(object1)->getBoundBoxPtr());
return 0;
}