[num-utils] change IsValueInRange() return type to bool (#11821)

This change corrects the return type of the `IsValueInRange()`
template function to `bool`
This commit is contained in:
Abtin Keshavarzian
2025-08-18 10:42:40 -07:00
committed by GitHub
parent 9911440505
commit a1dec571fd
+1 -1
View File
@@ -159,7 +159,7 @@ template <typename IntType> 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 <typename Type> Type IsValueInRange(Type aValue, Type aMin, Type aMax)
template <typename Type> inline constexpr bool IsValueInRange(Type aValue, Type aMin, Type aMax)
{
return (aMin <= aValue) && (aValue <= aMax);
}