libgrapheme

unicode string library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | README | LICENSE

commit 0aa5d262f8d0975341bcc60916e12044c7d64d0d
parent 608a5c3c12c036871e74c9da12fe1fffb400e3f1
Author: Laslo Hunhold <dev@frign.de>
Date:   Tue,  4 Oct 2022 08:11:00 +0200

Use explicit constant-macro instead of cast

Thanks NRK for the suggestion!

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
Msrc/character.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/character.c b/src/character.c @@ -132,9 +132,9 @@ static inline void state_deserialize(uint_least16_t in, struct character_break_state *out) { out->prop = in & UINT8_C(0xFF); - out->prop_set = in & (((uint_least16_t)(1)) << 8); - out->gb11_flag = in & (((uint_least16_t)(1)) << 9); - out->gb12_13_flag = in & (((uint_least16_t)(1)) << 10); + out->prop_set = in & (UINT16_C(1) << 8); + out->gb11_flag = in & (UINT16_C(1) << 9); + out->gb12_13_flag = in & (UINT16_C(1) << 10); } bool