aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_transposed.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-28 22:03:48 +0100
committerMattias Andrée <m@maandree.se>2026-01-28 22:03:48 +0100
commit40bf70fb8f23e5ff7212b568c69e0725372e5b57 (patch)
tree0d4be706d0182ddeafd4eaafd073e12c2fa2a9e8 /libcharconv_transposed.c
parentMisc stuff (diff)
downloadcharconv-40bf70fb8f23e5ff7212b568c69e0725372e5b57.tar.gz
charconv-40bf70fb8f23e5ff7212b568c69e0725372e5b57.tar.bz2
charconv-40bf70fb8f23e5ff7212b568c69e0725372e5b57.tar.xz
Clean up
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libcharconv_transposed.c')
-rw-r--r--libcharconv_transposed.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libcharconv_transposed.c b/libcharconv_transposed.c
index af2a835..e73dcbc 100644
--- a/libcharconv_transposed.c
+++ b/libcharconv_transposed.c
@@ -22,13 +22,7 @@ libcharconv_transposed(const char *s, size_t slen, size_t *n, uint_least32_t *cp
continue;
}
- if (UINT32_C(0x1F030) <= c && c <= UINT32_C(0x1F061)) {
- c += 0x32u;
- goto conv;
- } else if (UINT32_C(0x1F062) <= c && c <= UINT32_C(0x1F093)) {
- c -= 0x32u;
- goto conv;
- }
+ PLAIN_RANGE_SWAP(0x1F030, 0x1F061, 0x1F062, 0x1F093);
*n += clen;
s = &s[clen];