This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Reorder cases: in switch
authorKarl Williamson <khw@cpan.org>
Fri, 1 Aug 2014 15:58:02 +0000 (09:58 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 21 Aug 2014 20:49:46 +0000 (14:49 -0600)
This makes it slightly more reader-friendly

regcomp.c

index cff7207..d5bb3a2 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -16666,11 +16666,11 @@ S_put_byte(pTHX_ SV *sv, int c)
 
     if (!isPRINT(c)) {
         switch (c) {
 
     if (!isPRINT(c)) {
         switch (c) {
-            case '\r': Perl_sv_catpvf(aTHX_ sv, "\\r"); break;
+            case '\a': Perl_sv_catpvf(aTHX_ sv, "\\a"); break;
+            case '\f': Perl_sv_catpvf(aTHX_ sv, "\\f"); break;
             case '\n': Perl_sv_catpvf(aTHX_ sv, "\\n"); break;
             case '\n': Perl_sv_catpvf(aTHX_ sv, "\\n"); break;
+            case '\r': Perl_sv_catpvf(aTHX_ sv, "\\r"); break;
             case '\t': Perl_sv_catpvf(aTHX_ sv, "\\t"); break;
             case '\t': Perl_sv_catpvf(aTHX_ sv, "\\t"); break;
-            case '\f': Perl_sv_catpvf(aTHX_ sv, "\\f"); break;
-            case '\a': Perl_sv_catpvf(aTHX_ sv, "\\a"); break;
 
             default:
                 Perl_sv_catpvf(aTHX_ sv, "\\x{%x}", c);
 
             default:
                 Perl_sv_catpvf(aTHX_ sv, "\\x{%x}", c);