From 7e18694790359f7a8ce2e811637322dab9d0cb86 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sat, 22 Oct 2022 19:31:20 +0200 Subject: [PATCH] refactor: `gsl_Assert` replaced with `gsl_Expects` --- src/core/include/units/dimension.h | 2 +- src/core/include/units/unit.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/include/units/dimension.h b/src/core/include/units/dimension.h index 561f99c2..304e5910 100644 --- a/src/core/include/units/dimension.h +++ b/src/core/include/units/dimension.h @@ -266,7 +266,7 @@ template template [[nodiscard]] consteval Dimension auto operator/(int value, D) { - gsl_Assert(value == 1); + gsl_Expects(value == 1); return detail::expr_invert(detail::dim_type{}); } diff --git a/src/core/include/units/unit.h b/src/core/include/units/unit.h index a620c2cb..457ebab2 100644 --- a/src/core/include/units/unit.h +++ b/src/core/include/units/unit.h @@ -445,7 +445,7 @@ template template [[nodiscard]] consteval Unit auto operator/(int value, U u) { - gsl_Assert(value == 1); + gsl_Expects(value == 1); return detail::expr_invert(u); } @@ -678,7 +678,7 @@ constexpr Out unit_symbol_impl(Out out, const type_list& nums, const ty template Out, typename... Us> constexpr Out unit_symbol_impl(Out out, const derived_unit&, unit_symbol_formatting fmt, bool negative_power) { - gsl_Assert(negative_power == false); + gsl_Expects(negative_power == false); return unit_symbol_impl(out, typename derived_unit::_num_{}, typename derived_unit::_den_{}, fmt); }