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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user