[metacity] edge-resistance: fix cast-function-type warning



commit 3e1a3f3000b6db6fe05a51d637264ebe8d14708e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Sep 2 13:55:52 2018 +0300

    edge-resistance: fix cast-function-type warning

 src/core/edge-resistance.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/core/edge-resistance.c b/src/core/edge-resistance.c
index 4bab4a1b..105c51b3 100644
--- a/src/core/edge-resistance.c
+++ b/src/core/edge-resistance.c
@@ -1105,13 +1105,7 @@ compute_resistance_and_snapping_edges (MetaDisplay *display)
   g_list_free (stacked_windows);
   /* Free the memory used by the obscuring windows/docks lists */
   g_slist_free (window_stacking);
-  /* FIXME: Shouldn't there be a helper function to make this one line of code
-   * to free a list instead of four ugly ones?
-   */
-  g_slist_foreach (obscuring_windows,
-                   (void (*)(gpointer,gpointer))&g_free, /* ew, for ugly */
-                   NULL);
-  g_slist_free (obscuring_windows);
+  g_slist_free_full (obscuring_windows, g_free);
 
   /* Sort the list.  FIXME: Should I bother with this sorting?  I just
    * sort again later in cache_edges() anyway...


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