summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-10-06 15:08:19 -0600
committerKarl Williamson <public@khwilliamson.com>2012-10-09 11:16:06 -0600
commit4cbf4130b603602204e51a4eaae4cab886651611 (patch)
treeaba3fd9e21a01a854edb653828773a35bf9cb235 /utf8.c
parentc74f6de970ef0f0eb8ba43b1840fde0cf5a45497 (diff)
downloadperl-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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/utf8.c b/utf8.c
index 660002388f..13fb689075 100644
--- a/utf8.c
+++ b/utf8.c
@@ -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++;
}