Base: C++ core guidelines: init variables

This commit is contained in:
wmayer
2023-08-24 14:21:05 +02:00
committed by wwmayer
parent 53a4fb14c3
commit 010dca8303
43 changed files with 622 additions and 626 deletions

View File

@@ -52,7 +52,7 @@ int CoordinateSystemPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
PyObject* CoordinateSystemPy::setAxes(PyObject * args)
{
PyObject *axis, *xdir;
PyObject *axis{}, *xdir{};
if (PyArg_ParseTuple(args, "O!O!", &(AxisPy::Type), &axis, &(VectorPy::Type), &xdir)) {
getCoordinateSystemPtr()->setAxes(*static_cast<AxisPy*>(axis)->getAxisPtr(),
*static_cast<VectorPy*>(xdir)->getVectorPtr());
@@ -72,7 +72,7 @@ PyObject* CoordinateSystemPy::setAxes(PyObject * args)
PyObject* CoordinateSystemPy::displacement(PyObject * args)
{
PyObject *cs;
PyObject *cs{};
if (!PyArg_ParseTuple(args, "O!", &(CoordinateSystemPy::Type), &cs))
return nullptr;
Placement p = getCoordinateSystemPtr()->displacement(
@@ -82,7 +82,7 @@ PyObject* CoordinateSystemPy::displacement(PyObject * args)
PyObject* CoordinateSystemPy::transformTo(PyObject * args)
{
PyObject *vec;
PyObject *vec{};
if (!PyArg_ParseTuple(args, "O!", &(VectorPy::Type), &vec))
return nullptr;
Vector3d v = static_cast<VectorPy*>(vec)->value();
@@ -92,7 +92,7 @@ PyObject* CoordinateSystemPy::transformTo(PyObject * args)
PyObject* CoordinateSystemPy::transform(PyObject * args)
{
PyObject *plm;
PyObject *plm{};
if (PyArg_ParseTuple(args, "O!", &(PlacementPy::Type), &plm)) {
getCoordinateSystemPtr()->transform(*static_cast<PlacementPy*>(plm)->getPlacementPtr());
Py_Return;
@@ -110,7 +110,7 @@ PyObject* CoordinateSystemPy::transform(PyObject * args)
PyObject* CoordinateSystemPy::setPlacement(PyObject * args)
{
PyObject *plm;
PyObject *plm{};
if (!PyArg_ParseTuple(args, "O!", &(PlacementPy::Type), &plm))
return nullptr;
getCoordinateSystemPtr()->setPlacement(*static_cast<PlacementPy*>(plm)->getPlacementPtr());
@@ -136,7 +136,7 @@ void CoordinateSystemPy::setAxis(Py::Object arg)
Py::Object CoordinateSystemPy::getXDirection() const
{
return Py::Vector(getCoordinateSystemPtr()->getXDirection());
return Py::Vector(getCoordinateSystemPtr()->getXDirection()); // NOLINT
}
void CoordinateSystemPy::setXDirection(Py::Object arg)
@@ -146,7 +146,7 @@ void CoordinateSystemPy::setXDirection(Py::Object arg)
Py::Object CoordinateSystemPy::getYDirection() const
{
return Py::Vector(getCoordinateSystemPtr()->getYDirection());
return Py::Vector(getCoordinateSystemPtr()->getYDirection()); // NOLINT
}
void CoordinateSystemPy::setYDirection(Py::Object arg)
@@ -156,7 +156,7 @@ void CoordinateSystemPy::setYDirection(Py::Object arg)
Py::Object CoordinateSystemPy::getZDirection() const
{
return Py::Vector(getCoordinateSystemPtr()->getZDirection());
return Py::Vector(getCoordinateSystemPtr()->getZDirection()); // NOLINT
}
void CoordinateSystemPy::setZDirection(Py::Object arg)
@@ -166,7 +166,7 @@ void CoordinateSystemPy::setZDirection(Py::Object arg)
Py::Object CoordinateSystemPy::getPosition() const
{
return Py::Vector(getCoordinateSystemPtr()->getPosition());
return Py::Vector(getCoordinateSystemPtr()->getPosition()); // NOLINT
}
void CoordinateSystemPy::setPosition(Py::Object arg)