aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/bytes.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-28 17:27:05 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-28 17:27:05 -0500
commitcfce376f585e0cd0231e95843617f75bd65b6c07 (patch)
tree9457de8bb9b8d0643c83cd5c08182af6a86804b7 /src/stdlib/bytes.c
parentb80e21ce3d673d981e44a725c62b62563a77db9b (diff)
Change autoformatter to no longer allow single-line functions
Diffstat (limited to 'src/stdlib/bytes.c')
-rw-r--r--src/stdlib/bytes.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/stdlib/bytes.c b/src/stdlib/bytes.c
index a1e953a0..2b8dab4d 100644
--- a/src/stdlib/bytes.c
+++ b/src/stdlib/bytes.c
@@ -30,7 +30,9 @@ PUREFUNC public Text_t Byte$as_text(const void *b, bool colorize, const TypeInfo
}
public
-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) {
+ return low <= x && x <= high;
+}
public
OptionalByte_t Byte$parse(Text_t text, OptionalInt_t base, Text_t *remainder) {
@@ -67,7 +69,9 @@ public
bool Byte$get_bit(Byte_t x, Int_t bit_index) {
if (Int$compare_value(bit_index, I(1)) < 0) fail("Invalid bit index (expected 1 or higher): ", bit_index);
if (Int$compare_value(bit_index, I(8)) > 0)
- fail("Bit index is too large! There are only 8 bits in a byte, but index is: ", bit_index);
+ fail("Bit index is too large! There are only 8 bits in a byte, but index "
+ "is: ",
+ bit_index);
return ((x & (Byte_t)(1L << (Int64$from_int(bit_index, true) - 1L))) != 0);
}