From ca2bd06b327e9b0a3bde75b4f2390a986ae0b57f Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Thu, 28 May 2009 10:09:07 -0400 Subject: [PATCH] Fix coding style --- champlain/champlain-view.c | 20 ++++++++++---------- champlain/champlain-zoom-level.c | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c index c5ffaf5..474edbe 100644 --- a/champlain/champlain-view.c +++ b/champlain/champlain-view.c @@ -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); diff --git a/champlain/champlain-zoom-level.c b/champlain/champlain-zoom-level.c index 9bb828a..155e323 100644 --- a/champlain/champlain-zoom-level.c +++ b/champlain/champlain-zoom-level.c @@ -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); -- 2.39.5