[gnome-games] aisleriot: Use new glib compat define



commit 54ea7a62e8e38e3f479614f5472b188bccc8754d
Author: Christian Persch <chpe gnome org>
Date:   Mon Jan 4 20:06:29 2010 +0100

    aisleriot: Use new glib compat define

 aisleriot/board-noclutter.c |    6 +-----
 aisleriot/board.c           |    6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/aisleriot/board-noclutter.c b/aisleriot/board-noclutter.c
index 7d774f1..9f9e197 100644
--- a/aisleriot/board-noclutter.c
+++ b/aisleriot/board-noclutter.c
@@ -60,10 +60,6 @@
 
 #define DOUBLE_TO_INT_CEIL(d) ((int) (d + 0.5))
 
-#define STATIC_ASSERT(condition) STATIC_ASSERT_IMPL(condition, __LINE__)
-#define STATIC_ASSERT_IMPL(condition, line) STATIC_ASSERT_IMPL2(condition, line)
-#define STATIC_ASSERT_IMPL2(condition, line) typedef int _static_assert_line_##line[(condition) ? 1 : -1]
-
 #ifdef HAVE_HILDON 
 #define PIXBUF_DRAWING_LIKELIHOOD(cond) G_UNLIKELY (cond)
 #else
@@ -176,7 +172,7 @@ struct _AisleriotBoardPrivate
   guint force_geometry_update : 1;
 };
 
-STATIC_ASSERT (LAST_STATUS < 16 /* 2^4 */);
+G_STATIC_ASSERT (LAST_STATUS < 16 /* 2^4 */);
 
 enum
 {
diff --git a/aisleriot/board.c b/aisleriot/board.c
index 029002e..cfaa475 100644
--- a/aisleriot/board.c
+++ b/aisleriot/board.c
@@ -62,10 +62,6 @@
 
 #define DOUBLE_TO_INT_CEIL(d) ((int) (d + 0.5))
 
-#define STATIC_ASSERT(condition) STATIC_ASSERT_IMPL(condition, __LINE__)
-#define STATIC_ASSERT_IMPL(condition, line) STATIC_ASSERT_IMPL2(condition, line)
-#define STATIC_ASSERT_IMPL2(condition, line) typedef int _static_assert_line_##line[(condition) ? 1 : -1]
-
 #define I_(string) g_intern_static_string (string)
   
 /* FIXMEchpe: file a bug to get an exported function like gtk_accelerator_get_default_mod_mask() for this? */
@@ -211,7 +207,7 @@ struct _RemovedCard
   gboolean from_drag;
 };
 
-STATIC_ASSERT (LAST_STATUS < 16 /* 2^4 */);
+G_STATIC_ASSERT (LAST_STATUS < 16 /* 2^4 */);
 
 enum
 {



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