diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-10-06 15:08:19 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-10-09 11:16:06 -0600 |
commit | 4cbf4130b603602204e51a4eaae4cab886651611 (patch) | |
tree | aba3fd9e21a01a854edb653828773a35bf9cb235 /utf8.c | |
parent | c74f6de970ef0f0eb8ba43b1840fde0cf5a45497 (diff) | |
download | perl-4cbf4130b603602204e51a4eaae4cab886651611.tar.gz |
utf8.c: Remove an unnecessary conditional
The unconditional array lookup is clearer, and I suspect faster than
testing for a special case.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1096,10 +1096,7 @@ Perl_utf8_length(pTHX_ const U8 *s, const U8 *e) if (e < s) goto warn_and_return; while (s < e) { - if (!UTF8_IS_INVARIANT(*s)) - s += UTF8SKIP(s); - else - s++; + s += UTF8SKIP(s); len++; } |