[gnome-maps/wip/rishi/silence-warnings: 5/5] maps-osm-object: Simplify code



commit c406bfdf095f5d0dc860330e14b43b468c889afe
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Oct 19 11:53:56 2018 +0200

    maps-osm-object: Simplify code
    
    https://gitlab.gnome.org/GNOME/gnome-maps/merge_requests/15

 lib/maps-osm-object.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/maps-osm-object.c b/lib/maps-osm-object.c
index 48de6b9..5a00f0c 100644
--- a/lib/maps-osm-object.c
+++ b/lib/maps-osm-object.c
@@ -224,8 +224,8 @@ maps_osm_object_delete_tag (MapsOSMObject *object, const char *key)
 static void
 maps_osm_object_foreach_tag (gpointer key, gpointer value, gpointer user_data)
 {
-  const char *name = (const char *) key;
-  const char *val = (const char *) value;
+  const xmlChar *name = (const xmlChar *) key;
+  const xmlChar *val = (const xmlChar *) value;
   xmlNodePtr object_node = (xmlNodePtr) user_data;
 
   /* skip tag if it has an empty placeholder value */
@@ -234,8 +234,8 @@ maps_osm_object_foreach_tag (gpointer key, gpointer value, gpointer user_data)
       xmlNodePtr tag_node;
 
       tag_node = xmlNewNode (NULL, (xmlChar *) "tag");
-      xmlNewProp (tag_node, (xmlChar *) "k", (xmlChar *) name);
-      xmlNewProp (tag_node, (xmlChar *) "v", (xmlChar *) val);
+      xmlNewProp (tag_node, (xmlChar *) "k", name);
+      xmlNewProp (tag_node, (xmlChar *) "v", val);
       xmlAddChild (object_node, tag_node);
     }
 }


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