This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: remove unnecessary tests
authorKarl Williamson <public@khwilliamson.com>
Sun, 28 Nov 2010 02:40:58 +0000 (19:40 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 28 Nov 2010 12:49:15 +0000 (04:49 -0800)
The tests in the else are unnecessary as they comprise everything else
but what the 'if' says.

regcomp.c

index 23824ac..a791864 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4724,7 +4724,7 @@ reStudy:
        if (PL_regkind[OP(first)] == EXACT) {
            if (OP(first) == EXACT)
                NOOP;   /* Empty, get anchored substr later. */
        if (PL_regkind[OP(first)] == EXACT) {
            if (OP(first) == EXACT)
                NOOP;   /* Empty, get anchored substr later. */
-           else if ((OP(first) == EXACTF || OP(first) == EXACTFL))
+           else
                ri->regstclass = first;
        }
 #ifdef TRIE_STCLASS    
                ri->regstclass = first;
        }
 #ifdef TRIE_STCLASS