[libchamplain] Make path parameters constant



commit e65ebbdca9bf95042b4f4542933d1aa774b980c9
Author: Simon Wenner <simon wenner ch>
Date:   Fri Jun 26 18:23:39 2009 +0200

    Make path parameters constant

 champlain/champlain-local-map-data-source.c |    2 +-
 champlain/champlain-local-map-data-source.h |    2 +-
 champlain/champlain-memphis-map-source.c    |    2 +-
 champlain/champlain-memphis-map-source.h    |    2 +-
 demos/local-rendering.c                     |    5 ++---
 5 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/champlain/champlain-local-map-data-source.c b/champlain/champlain-local-map-data-source.c
index 146f1a4..74580bb 100644
--- a/champlain/champlain-local-map-data-source.c
+++ b/champlain/champlain-local-map-data-source.c
@@ -111,7 +111,7 @@ champlain_local_map_data_source_new (void)
 
 void
 champlain_local_map_data_source_load_map_data (ChamplainLocalMapDataSource *self,
-    gchar *map_path)
+    const gchar *map_path)
 {
   g_return_if_fail (CHAMPLAIN_IS_LOCAL_MAP_DATA_SOURCE (self)
       && map_path);
diff --git a/champlain/champlain-local-map-data-source.h b/champlain/champlain-local-map-data-source.h
index d37fbbc..12f1e69 100644
--- a/champlain/champlain-local-map-data-source.h
+++ b/champlain/champlain-local-map-data-source.h
@@ -56,7 +56,7 @@ ChamplainLocalMapDataSource* champlain_local_map_data_source_new (void);
 
 void champlain_local_map_data_source_load_map_data (
     ChamplainLocalMapDataSource *map_data_source,
-    gchar *map_path);
+    const gchar *map_path);
 
 G_END_DECLS
 
diff --git a/champlain/champlain-memphis-map-source.c b/champlain/champlain-memphis-map-source.c
index cfe2c08..d976b32 100644
--- a/champlain/champlain-memphis-map-source.c
+++ b/champlain/champlain-memphis-map-source.c
@@ -330,7 +330,7 @@ champlain_memphis_map_source_set_tile_size (ChamplainMemphisMapSource *self,
 void
 champlain_memphis_map_source_load_rules (
     ChamplainMemphisMapSource *self,
-    gchar *rules_path)
+    const gchar *rules_path)
 {
   g_return_if_fail (CHAMPLAIN_IS_MEMPHIS_MAP_SOURCE (self));
 
diff --git a/champlain/champlain-memphis-map-source.h b/champlain/champlain-memphis-map-source.h
index 5a03179..2306aad 100644
--- a/champlain/champlain-memphis-map-source.h
+++ b/champlain/champlain-memphis-map-source.h
@@ -63,7 +63,7 @@ void champlain_memphis_map_source_set_tile_size (
 
 void champlain_memphis_map_source_load_rules (
     ChamplainMemphisMapSource *map_source,
-    gchar *rules_path);
+    const gchar *rules_path);
 
 void champlain_memphis_map_source_set_map_data_source (
     ChamplainMemphisMapSource *map_source,
diff --git a/demos/local-rendering.c b/demos/local-rendering.c
index cd2227f..e0bb2ea 100644
--- a/demos/local-rendering.c
+++ b/demos/local-rendering.c
@@ -51,9 +51,8 @@ load_map_data (ChamplainMapSource *source)
     champlain_memphis_map_source_get_map_data_source (
     CHAMPLAIN_MEMPHIS_MAP_SOURCE (source)));
 
-  gchar * tmp = g_strdup (maps[map_index]); // FIXME
-  champlain_local_map_data_source_load_map_data (map_data_source, tmp);
-  g_free (tmp);
+  champlain_local_map_data_source_load_map_data (map_data_source,
+      maps[map_index]);
 }
 
 static void



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