From 971197b9e53e71d43f58fea85c89c9a669643c84 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 4 Dec 2024 20:08:02 +0100 Subject: [PATCH] refactor: `quantity` constructor refactored to use another constructor with the result of `sudo_cast` --- src/core/include/mp-units/framework/quantity.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/include/mp-units/framework/quantity.h b/src/core/include/mp-units/framework/quantity.h index 697efbb3..0f9dc072 100644 --- a/src/core/include/mp-units/framework/quantity.h +++ b/src/core/include/mp-units/framework/quantity.h @@ -195,8 +195,7 @@ public: template Q> // NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions) constexpr explicit(!std::convertible_to) quantity(const Q& q) : - numerical_value_is_an_implementation_detail_( - detail::sudo_cast(q).numerical_value_is_an_implementation_detail_) + quantity(detail::sudo_cast(q)) { }