Base: fix QuantityPy::getValueAs

Fixes: 77f4515963 ("Base: refactor QuantityPy class")
This commit is contained in:
Ladislav Michl
2025-05-16 12:24:53 +02:00
committed by Benjamin Nauck
parent 285a930d70
commit d80e5d0a8a

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> {