Base: fix QuantityPy::getValueAs

Fixes: 77f4515963 ("Base: refactor QuantityPy class")
This commit is contained in:
Ladislav Michl
2025-05-19 12:15:51 +02:00
committed by Benjamin Nauck
parent 285a930d70
commit d80e5d0a8a
+1 -1
View File
@@ -192,7 +192,7 @@ PyObject* QuantityPy::getValueAs(PyObject* args) const
return std::nullopt;
}
return *getQuantityPtr();
return *static_cast<QuantityPy*>(object)->getQuantityPtr();
};
auto tryUnit = [&]() -> std::optional<Quantity> {