diff --git a/src/Base/QuantityPyImp.cpp b/src/Base/QuantityPyImp.cpp index a9637bbc2e..11d5db20d5 100644 --- a/src/Base/QuantityPyImp.cpp +++ b/src/Base/QuantityPyImp.cpp @@ -86,7 +86,6 @@ int QuantityPy::PyInit(PyObject* args, PyObject* /*kwd*/) PyErr_Clear(); // set by PyArg_ParseTuple() PyObject *object; if (PyArg_ParseTuple(args,"O!",&(Base::QuantityPy::Type), &object)) { - // Note: must be static_cast, not reinterpret_cast *self = *(static_cast(object)->getQuantityPtr()); return 0; } @@ -94,7 +93,6 @@ int QuantityPy::PyInit(PyObject* args, PyObject* /*kwd*/) PyErr_Clear(); // set by PyArg_ParseTuple() double f = DOUBLE_MAX; if (PyArg_ParseTuple(args,"dO!",&f,&(Base::UnitPy::Type), &object)) { - // Note: must be static_cast, not reinterpret_cast *self = Quantity(f,*(static_cast(object)->getUnitPtr())); return 0; } @@ -187,7 +185,6 @@ PyObject* QuantityPy::getValueAs(PyObject *args) if (!quant.isValid()) { PyObject *object; if (PyArg_ParseTuple(args,"O!",&(Base::QuantityPy::Type), &object)) { - // Note: must be static_cast, not reinterpret_cast quant = * static_cast(object)->getQuantityPtr(); } } @@ -196,7 +193,6 @@ PyObject* QuantityPy::getValueAs(PyObject *args) PyObject *object; PyErr_Clear(); if (PyArg_ParseTuple(args,"O!",&(Base::UnitPy::Type), &object)) { - // Note: must be static_cast, not reinterpret_cast quant.setUnit(*static_cast(object)->getUnitPtr()); quant.setValue(1.0); } @@ -207,7 +203,6 @@ PyObject* QuantityPy::getValueAs(PyObject *args) double value; PyErr_Clear(); if (PyArg_ParseTuple(args,"dO!",&value, &(Base::UnitPy::Type), &object)) { - // Note: must be static_cast, not reinterpret_cast quant.setUnit(*static_cast(object)->getUnitPtr()); quant.setValue(value); } diff --git a/src/Base/UnitPyImp.cpp b/src/Base/UnitPyImp.cpp index 063168c1c7..e97bfaf7bf 100644 --- a/src/Base/UnitPyImp.cpp +++ b/src/Base/UnitPyImp.cpp @@ -67,7 +67,6 @@ int UnitPy::PyInit(PyObject* args, PyObject* /*kwd*/) // get quantity if (PyArg_ParseTuple(args,"O!",&(Base::QuantityPy::Type), &object)) { - // Note: must be static_cast, not reinterpret_cast *self = static_cast(object)->getQuantityPtr()->getUnit(); return 0; } @@ -75,7 +74,6 @@ int UnitPy::PyInit(PyObject* args, PyObject* /*kwd*/) // get unit if (PyArg_ParseTuple(args,"O!",&(Base::UnitPy::Type), &object)) { - // Note: must be static_cast, not reinterpret_cast *self = *(static_cast(object)->getUnitPtr()); return 0; } diff --git a/src/Base/Writer.cpp b/src/Base/Writer.cpp index 52cb6eb4bb..877163ca53 100644 --- a/src/Base/Writer.cpp +++ b/src/Base/Writer.cpp @@ -45,7 +45,10 @@ using namespace zipios; // --------------------------------------------------------------------------- Writer::Writer() - : indent(0),forceXML(false),fileVersion(1) + : indent(0) + , indBuf{} + , forceXML(false) + , fileVersion(1) { indBuf[0] = '\0'; }