diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-05-15 17:48:40 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-05-15 17:48:40 +0900 |
commit | 2e3f81838c6bf6408c154eee840a231312666fcd (patch) | |
tree | 18ff235615b80400e8385bb1bd23ae5f78e7dd76 /regparse.c | |
parent | 427ede2dde522327b4e3e6d18866b6cfe4423eb4 (diff) |
Align styles [ci skip]
Diffstat (limited to 'regparse.c')
-rw-r--r-- | regparse.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/regparse.c b/regparse.c index c7587b53b7..1026c323b5 100644 --- a/regparse.c +++ b/regparse.c @@ -5687,7 +5687,8 @@ i_apply_case_fold(OnigCodePoint from, OnigCodePoint to[], if (add_flag) { if (is_singlebyte_range(*to, env->enc)) { BITSET_SET_BIT(bs, *to); - } else { + } + else { r = add_code_range0(&(cc->mbuf), env, *to, *to, 0); if (r < 0) return r; } @@ -5699,10 +5700,12 @@ i_apply_case_fold(OnigCodePoint from, OnigCodePoint to[], if (is_singlebyte_range(*to, env->enc)) { if (IS_NCCLASS_NOT(cc)) { BITSET_CLEAR_BIT(bs, *to); - } else { + } + else { BITSET_SET_BIT(bs, *to); } - } else { + } + else { if (IS_NCCLASS_NOT(cc)) clear_not_flag_cclass(cc, env->enc); r = add_code_range0(&(cc->mbuf), env, *to, *to, 0); if (r < 0) return r; @@ -6282,7 +6285,8 @@ is_onechar_cclass(CClassNode* cc, OnigCodePoint* code) if (b1 != 0) { if (((b1 & (b1 - 1)) == 0) && (c == not_found)) { c = BITS_IN_ROOM * i + countbits(b1 - 1); - } else { + } + else { return 0; /* the character class contains multiple chars */ } } |