Base/App: fix warnings from code analysers:

* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
This commit is contained in:
wmayer
2022-03-06 23:49:30 +01:00
parent 1be4ed57ae
commit e4435cdcba
30 changed files with 211 additions and 155 deletions

View File

@@ -74,7 +74,7 @@ Base::Quantity PropertyQuantity::createQuantityFromPy(PyObject *value)
else if (PyFloat_Check(value))
quant = Quantity(PyFloat_AsDouble(value),_Unit);
else if (PyLong_Check(value))
quant = Quantity((double)PyLong_AsLong(value),_Unit);
quant = Quantity(double(PyLong_AsLong(value)),_Unit);
else if (PyObject_TypeCheck(value, &(QuantityPy::Type))) {
Base::QuantityPy *pcObject = static_cast<Base::QuantityPy*>(value);
quant = *(pcObject->getQuantityPtr());