[gnome-todo] scheduled: Use autoptr
- From: Gitlab Administrative User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] scheduled: Use autoptr
- Date: Sat, 11 Nov 2017 06:00:46 +0000 (UTC)
commit bb565a4489983938bbcf461345f6edb5cf8b78b0
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Nov 11 03:51:05 2017 -0200
scheduled: Use autoptr
plugins/scheduled-panel/gtd-panel-scheduled.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/plugins/scheduled-panel/gtd-panel-scheduled.c b/plugins/scheduled-panel/gtd-panel-scheduled.c
index 9405921..c7d13fc 100644
--- a/plugins/scheduled-panel/gtd-panel-scheduled.c
+++ b/plugins/scheduled-panel/gtd-panel-scheduled.c
@@ -162,7 +162,7 @@ gtd_panel_scheduled_header_func (GtkListBoxRow *row,
GtdTask *before_task,
GtdPanelScheduled *panel)
{
- GDateTime *dt;
+ g_autoptr (GDateTime) dt = NULL;
gchar *text;
gint span;
@@ -180,7 +180,7 @@ gtd_panel_scheduled_header_func (GtkListBoxRow *row,
}
else
{
- GDateTime *before_dt;
+ g_autoptr (GDateTime) before_dt = NULL;
gint diff;
before_dt = gtd_task_get_due_date (before_task);
@@ -198,11 +198,7 @@ gtd_panel_scheduled_header_func (GtkListBoxRow *row,
{
gtk_list_box_row_set_header (row, NULL);
}
-
- g_clear_pointer (&before_dt, g_date_time_unref);
}
-
- g_clear_pointer (&dt, g_date_time_unref);
}
static gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]