[librsvg: 56/95] rsvg_eval_switch_attributes(): Remove the last call to rsvg_property_bag_size()



commit dfacaee0f379359c2b6770319f97be4edf019bdb
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Feb 20 20:28:13 2018 -0600

    rsvg_eval_switch_attributes(): Remove the last call to rsvg_property_bag_size()

 rsvg-cond.c | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)
---
diff --git a/rsvg-cond.c b/rsvg-cond.c
index e83bdfda..6243f849 100644
--- a/rsvg-cond.c
+++ b/rsvg-cond.c
@@ -173,27 +173,25 @@ rsvg_eval_switch_attributes (RsvgPropertyBag * atts, gboolean * p_has_cond)
     gboolean permitted = TRUE;
     gboolean has_cond = FALSE;
 
-    if (atts && rsvg_property_bag_size (atts)) {
-        const char *value;
-
-        if ((value = rsvg_property_bag_lookup (atts, "requiredFeatures"))) {
-            permitted =
-                rsvg_cond_fulfills_requirement (value, implemented_features,
-                                                nb_implemented_features);
-            has_cond = TRUE;
-        }
+    const char *value;
 
-        if (permitted && (value = rsvg_property_bag_lookup (atts, "requiredExtensions"))) {
-            permitted =
-                rsvg_cond_fulfills_requirement (value, implemented_extensions,
-                                                nb_implemented_extensions);
-            has_cond = TRUE;
-        }
+    if ((value = rsvg_property_bag_lookup (atts, "requiredFeatures"))) {
+        permitted =
+            rsvg_cond_fulfills_requirement (value, implemented_features,
+                                            nb_implemented_features);
+        has_cond = TRUE;
+    }
 
-        if (permitted && (value = rsvg_property_bag_lookup (atts, "systemLanguage"))) {
-            permitted = rsvg_cond_parse_system_language (value);
-            has_cond = TRUE;
-        }
+    if (permitted && (value = rsvg_property_bag_lookup (atts, "requiredExtensions"))) {
+        permitted =
+            rsvg_cond_fulfills_requirement (value, implemented_extensions,
+                                            nb_implemented_extensions);
+        has_cond = TRUE;
+    }
+
+    if (permitted && (value = rsvg_property_bag_lookup (atts, "systemLanguage"))) {
+        permitted = rsvg_cond_parse_system_language (value);
+        has_cond = TRUE;
     }
 
     if (p_has_cond)


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