From eb28aa8f8c9168cd5c2d0156d95a8033e8da83b2 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 15 Aug 2023 11:15:20 +0200 Subject: [PATCH] fix: `point_from()` now returns a point with a proper representation type --- src/core/include/mp-units/quantity_point.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/include/mp-units/quantity_point.h b/src/core/include/mp-units/quantity_point.h index c6788e5b..fb906dda 100644 --- a/src/core/include/mp-units/quantity_point.h +++ b/src/core/include/mp-units/quantity_point.h @@ -150,7 +150,8 @@ public: auto q = absolute() - origin.quantity_point.absolute(); return quantity_point(std::move(q)); } else { - return quantity_point(absolute()); + auto q = absolute(); + return quantity_point(std::move(q)); } }