diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-04-13 00:08:01 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-04-13 00:08:01 +0200 |
commit | b60237fe9105febf5792c372a5ee41084f5e8431 (patch) | |
tree | 62a33d08b87c4c2c5d9dcb8cd3f7e996ac9ffecc /lib | |
parent | db56fe305d64040bdba221f10b29139a691d58fd (diff) |
Use ternary expressions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicode/prop/uprop_get_tc.c | 5 | ||||
-rw-r--r-- | lib/unicode/prop/uprop_get_uc.c | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/unicode/prop/uprop_get_tc.c b/lib/unicode/prop/uprop_get_tc.c index 3c957cf..c4c8070 100644 --- a/lib/unicode/prop/uprop_get_tc.c +++ b/lib/unicode/prop/uprop_get_tc.c @@ -70,8 +70,5 @@ uprop_get_tc(rune ch, struct tcctx ctx) return M(); rune CH = uprop_get_stc(ch); - if (ch != CH) - return M(CH); - - return mlib_lookup_kv(ch); + return ch != CH ? M(CH) : mlib_lookup_kv(ch); } diff --git a/lib/unicode/prop/uprop_get_uc.c b/lib/unicode/prop/uprop_get_uc.c index 724e034..c1ddf87 100644 --- a/lib/unicode/prop/uprop_get_uc.c +++ b/lib/unicode/prop/uprop_get_uc.c @@ -127,8 +127,5 @@ uprop_get_uc(rune ch, struct ucctx ctx) return M(); rune CH = uprop_get_suc(ch); - if (ch != CH) - return M(CH); - - return mlib_lookup_kv(ch); + return ch != CH ? M(CH) : mlib_lookup_kv(ch); } |