Base: make UnitsApi::toNumber method of Quantity
This static method takes Quantity as a parameter, so make it method of Quantity directly.
This commit is contained in:
@@ -217,5 +217,6 @@ PyObject* UnitsApi::sToNumber(PyObject* /*self*/, PyObject* args)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return Py::new_reference_to(Py::String(toNumber(value, qf)));
|
||||
const Quantity quantity {value};
|
||||
return Py::new_reference_to(Py::String(quantity.toNumber(qf)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user