diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-01-04 21:12:07 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-01-09 14:05:43 -0700 |
commit | ce06237d0b462fe78ff975ab859a7140c2854fb0 (patch) | |
tree | 2d517bccbd502360fedc9c6c9126646f4c9b9039 /regcomp.c | |
parent | 169068d9015763c5a30a795ed92a4af2fdb3230d (diff) | |
download | perl-ce06237d0b462fe78ff975ab859a7140c2854fb0.tar.gz |
regcomp.c: Collapse two code branches
Previous commits have simplified things so these two if-then-else
branches can be collapsed into one.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -13471,6 +13471,9 @@ parseit: } } else { /* Garden variety class */ + SV** posixes_ptr = namedclass % 2 == 0 + ? &posixes + : &nposixes; /* The ascii range inversion list */ SV* ascii_source = PL_Posix_ptrs[classnum]; @@ -13486,22 +13489,12 @@ parseit: } #endif - if (namedclass % 2 == 0) { /* A non-complemented class, - like ANYOF_PUNCT */ - _invlist_union(posixes, + _invlist_union_maybe_complement_2nd(*posixes_ptr, (AT_LEAST_ASCII_RESTRICTED) ? ascii_source : *source_ptr, - &posixes); - } - else { /* A complemented class, like ANYOF_NPUNCT */ - _invlist_union_complement_2nd( - nposixes, - (AT_LEAST_ASCII_RESTRICTED) - ? ascii_source - : *source_ptr, - &nposixes); - } + namedclass % 2 != 0, + posixes_ptr); } continue; /* Go get next character */ } |