From 82f5f05bb9440b758ae5e4a7c168e36ecff06db5 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 7 Apr 2025 03:21:58 -0400 Subject: Move clamped() and is_between() to proper functions (not just macros) --- src/stdlib/bytes.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/stdlib/bytes.h') diff --git a/src/stdlib/bytes.h b/src/stdlib/bytes.h index 2794d1d9..5c64687d 100644 --- a/src/stdlib/bytes.h +++ b/src/stdlib/bytes.h @@ -22,9 +22,7 @@ Byte_t Byte$from_int16(int16_t i, bool truncate); Closure_t Byte$to(Byte_t first, Byte_t last, OptionalInt8_t step); MACROLIKE Byte_t Byte$from_int8(int8_t i) { return (Byte_t)i; } MACROLIKE Byte_t Byte$from_bool(bool b) { return (Byte_t)b; } -MACROLIKE CONSTFUNC bool Byte$is_between(const Byte_t x, const Byte_t low, const Byte_t high) { - return low <= x && x <= high; -} +CONSTFUNC bool Byte$is_between(const Byte_t x, const Byte_t low, const Byte_t high); extern const Byte_t Byte$min; extern const Byte_t Byte$max; -- cgit v1.2.3