event: Receive the time_t directly

There is absolutely no reason to receive a pointer
to an integer when we can receive the actual integer.
This commit is contained in:
Georges Basile Stavracas Neto
2019-04-29 17:08:53 -03:00
parent b967f047bf
commit 6ecb7465eb
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ sort_event_data (GcalEvent *a,
GcalEvent *b,
gpointer user_data)
{
return gcal_event_compare_with_current (a, b, user_data);
return gcal_event_compare_with_current (a, b, GPOINTER_TO_INT (user_data));
}
static gboolean
@@ -330,7 +330,7 @@ query_completed_cb (GcalShellSearchProvider *self,
g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
current_time_t = time (NULL);
events = g_list_sort_with_data (events, (GCompareDataFunc) sort_event_data, &current_time_t);
events = g_list_sort_with_data (events, (GCompareDataFunc) sort_event_data, GINT_TO_POINTER (current_time_t));
for (l = events; l != NULL; l = g_list_next (l))
{
const gchar *uid;