diff options
author | Karl Williamson <khw@cpan.org> | 2022-03-31 08:40:25 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-04-01 09:25:36 -0600 |
commit | a3ccbff349554ef2ae3d50f7ff0e1b4e830933bd (patch) | |
tree | 578b05ba0a05aa8be7c44e4891b2719827b993d7 /toke.c | |
parent | c9243525b41868696263f5cf466b73718e734a99 (diff) | |
download | perl-a3ccbff349554ef2ae3d50f7ff0e1b4e830933bd.tar.gz |
toke.c: Reorder branches for clarity
The trivial case should be handled first.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11535,7 +11535,10 @@ Perl_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int } /* Here, still in the middle of the string; copy this character */ - if (UTF && ! UTF8_IS_INVARIANT((U8) *s)) { + if (! UTF || UTF8_IS_INVARIANT((U8) *s)) { + *to++ = *s++; + } + else { size_t this_char_len = UTF8SKIP(s); Copy(s, to, this_char_len, char); s += this_char_len; @@ -11543,9 +11546,6 @@ Perl_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int d_is_utf8 = TRUE; } - else { - *to++ = *s++; - } } /* End of loop through buffer */ /* Here, found end of the string, OR ran out of buffer: terminate the |