]> err.no Git - libchamplain/commitdiff
Fix coding style
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 28 May 2009 14:09:07 +0000 (10:09 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 28 May 2009 14:09:07 +0000 (10:09 -0400)
champlain/champlain-view.c
champlain/champlain-zoom-level.c

index c5ffaf5edd3f2a17ec045fcf6cc19405085c0f67..474edbecabb67403ca05aa7b42cf24734a870d33 100644 (file)
@@ -517,61 +517,61 @@ champlain_view_dispose (GObject *object)
   ChamplainView *view = CHAMPLAIN_VIEW (object);
   ChamplainViewPrivate *priv = view->priv;
 
-  if (priv->factory)
+  if (priv->factory != NULL)
     {
       g_object_unref (priv->factory);
       priv->factory = NULL;
     }
 
-  if (priv->map_source)
+  if (priv->map_source != NULL)
     {
       g_object_unref (priv->map_source);
       priv->map_source = NULL;
     }
 
-  if (priv->license_actor)
+  if (priv->license_actor != NULL)
     {
       g_object_unref (priv->license_actor);
       priv->license_actor = NULL;
     }
 
-  if (priv->finger_scroll)
+  if (priv->finger_scroll != NULL)
     {
       g_object_unref (priv->finger_scroll);
       priv->finger_scroll = NULL;
     }
 
-  if (priv->viewport)
+  if (priv->viewport != NULL)
     {
       g_object_unref (priv->viewport);
       priv->viewport = NULL;
     }
 
-  if (priv->map_layer)
+  if (priv->map_layer != NULL)
     {
       g_object_unref (priv->map_layer);
       priv->map_layer = NULL;
     }
 
-  if (priv->user_layers)
+  if (priv->user_layers != NULL)
     {
       g_object_unref (priv->user_layers);
       priv->user_layers = NULL;
     }
 
-  if (priv->stage)
+  if (priv->stage != NULL)
     {
       g_object_unref (priv->stage);
       priv->stage = NULL;
     }
 
-  if (priv->map)
+  if (priv->map != NULL)
     {
       map_free (priv->map);
       priv->map = NULL;
     }
 
-  if (priv->goto_context)
+  if (priv->goto_context != NULL)
     g_free (priv->goto_context);
 
   G_OBJECT_CLASS (champlain_view_parent_class)->dispose (object);
index 9bb828a4d9434fdcb3b1c6c7c8a43c1851f61057..155e323b6eac9525440d519a413e0530fe456496 100644 (file)
@@ -121,7 +121,8 @@ champlain_zoom_level_dispose (GObject *object)
 
   if (priv->tiles != NULL)
     {
-      for (k = 0; k < champlain_zoom_level_tile_count (level); k++)
+      int count = champlain_zoom_level_tile_count (level);
+      for (k = 0; k < count; k++)
         {
           ChamplainTile *tile = champlain_zoom_level_get_nth_tile (level, k);
           champlain_zoom_level_remove_tile (level, tile);