commit 0aa5d262f8d0975341bcc60916e12044c7d64d0d
Author:     Laslo Hunhold <[email protected]>
AuthorDate: Tue Oct 4 08:11:00 2022 +0200
Commit:     Laslo Hunhold <[email protected]>
CommitDate: Tue Oct 4 08:11:40 2022 +0200

    Use explicit constant-macro instead of cast
    
    Thanks NRK for the suggestion!
    
    Signed-off-by: Laslo Hunhold <[email protected]>

diff --git a/src/character.c b/src/character.c
index 4240332..7bcc72f 100644
--- 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

Reply via email to