From a1dec571fd38d2b669e853f527781f7c5babc39d Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 18 Aug 2025 10:42:40 -0700 Subject: [PATCH] [num-utils] change `IsValueInRange()` return type to `bool` (#11821) This change corrects the return type of the `IsValueInRange()` template function to `bool` --- src/core/common/num_utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/common/num_utils.hpp b/src/core/common/num_utils.hpp index 6d031f4c6..8f112d4c6 100644 --- a/src/core/common/num_utils.hpp +++ b/src/core/common/num_utils.hpp @@ -159,7 +159,7 @@ template int8_t ClampToInt8(IntType aValue) * @retval TRUE If @p aValue is within `[aMin, aMax]` (inclusive). * @retval FALSE If @p aValue is not within `[aMin, aMax]` (inclusive). */ -template Type IsValueInRange(Type aValue, Type aMin, Type aMax) +template inline constexpr bool IsValueInRange(Type aValue, Type aMin, Type aMax) { return (aMin <= aValue) && (aValue <= aMax); }