[pango/test-coverage: 6/22] markup: Separate out all cases




commit c07f28d3f83678c4ad75086beca181a145ecf07d
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 26 14:49:51 2021 -0400

    markup: Separate out all cases
    
    No point in having a few attributes handled in
    the default case. Just split them all by the first
    char.

 pango/pango-markup.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index 9721595d..eb262980 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -1229,11 +1229,16 @@ span_parse_func     (MarkupData            *md G_GNUC_UNUSED,
        CHECK_ATTRIBUTE (underline);
        CHECK_ATTRIBUTE (underline_color);
        break;
-      default:
+      case 'r':
        CHECK_ATTRIBUTE (rise);
+        break;
+      case 'v':
        CHECK_ATTRIBUTE (variant);
+        break;
+      case 'w':
        CHECK_ATTRIBUTE (weight);
        break;
+      default:;
       }
 
       if (!found)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]