From ff14e4801643f8c69b5d31e183bfb71943ee519f Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 22 Apr 2024 19:23:14 +0200 Subject: Add explicit underlying type for enums Due to the size of the lookup tables, we want to use the smallest possible underlying type for the Unicode property enumerations in order to reduce the binary size as much as possible. --- lib/unicode/prop/uprop_blkname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/unicode') diff --git a/lib/unicode/prop/uprop_blkname.c b/lib/unicode/prop/uprop_blkname.c index 52616c5..490f133 100644 --- a/lib/unicode/prop/uprop_blkname.c +++ b/lib/unicode/prop/uprop_blkname.c @@ -339,6 +339,6 @@ static const struct u8view lookup[] = { struct u8view uprop_blkname(enum uprop_blk blk) { - ASSUME(blk >= 0 && blk < lengthof(lookup)); + ASSUME(blk < lengthof(lookup)); return lookup[blk]; } -- cgit v1.2.3