From 618b097c42372fbf927e1ce567ed1d9f01fbedef Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sun, 15 Sep 2024 19:29:40 -0600 Subject: [PATCH] refactor: `value_cast` now reuses `value_cast` --- src/core/include/mp-units/framework/value_cast.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/include/mp-units/framework/value_cast.h b/src/core/include/mp-units/framework/value_cast.h index 5fe64373..020424dc 100644 --- a/src/core/include/mp-units/framework/value_cast.h +++ b/src/core/include/mp-units/framework/value_cast.h @@ -93,7 +93,7 @@ template [[nodiscard]] constexpr Quantity auto value_cast(FwdQ&& q) { - return detail::sudo_cast>(std::forward(q)); + return value_cast(std::forward(q)); } @@ -181,9 +181,7 @@ template [[nodiscard]] constexpr QuantityPoint auto value_cast(FwdQP&& qp) { - return quantity_point{ - value_cast(std::forward(qp).quantity_from_origin_is_an_implementation_detail_), - QP::point_origin}; + return value_cast(std::forward(qp)); } /**