This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Remove unnecessary cast
authorKarl Williamson <khw@cpan.org>
Fri, 29 Aug 2014 03:12:39 +0000 (21:12 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 7 Sep 2014 03:12:05 +0000 (21:12 -0600)
The macro does the appropriate cast, and this is slightly more legible.

regcomp.c

index 26a2efc..ea9c368 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -16931,7 +16931,7 @@ S_put_charclass_bitmap_innards(pTHX_ SV *sv, char *bitmap, SV** bitmap_invlist)
      * ASCII puncts are set, including an extra amount for the backslashed
      * ones.  */
     for (i = 0; i < NUM_ANYOF_CODE_POINTS; i++) {
-        if (BITMAP_TEST((U8 *) bitmap,i)) {
+        if (BITMAP_TEST(bitmap, i)) {
             *invlist_ptr = add_cp_to_invlist(*invlist_ptr, i);
             if (isPUNCT_A(i)) {
                 punct_count++;