[beast: 1/16] SFI: use BSE_ASSERT_RETURN instead of a Rapicorn macro



commit 5184ee77896fb630eb3a3a0772f355d26e0612d4
Author: Tim Janik <timj gnu org>
Date:   Mon Sep 18 21:33:33 2017 +0200

    SFI: use BSE_ASSERT_RETURN instead of a Rapicorn macro
    
    Signed-off-by: Tim Janik <timj gnu org>

 sfi/gbsearcharray.hh |   10 +++++-----
 sfi/sficxx.hh        |   10 +++++-----
 sfi/sfivisitors.hh   |    2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/sfi/gbsearcharray.hh b/sfi/gbsearcharray.hh
index 920bf08..0e94314 100644
--- a/sfi/gbsearcharray.hh
+++ b/sfi/gbsearcharray.hh
@@ -114,7 +114,7 @@ g_bsearch_array_create (const GBSearchConfig *bconfig)
   GBSearchArray *barray;
   guint size;
 
-  RAPICORN_ASSERT_RETURN (bconfig != NULL, NULL);
+  BSE_ASSERT_RETURN (bconfig != NULL, NULL);
 
   size = sizeof (GBSearchArray) + bconfig->sizeof_node;
   if (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2)
@@ -172,7 +172,7 @@ g_bsearch_array_get_index (GBSearchArray        *barray,
 {
   guint distance = ((guint8*) node_in_array) - G_BSEARCH_ARRAY_NODES (barray);
 
-  RAPICORN_ASSERT_RETURN (node_in_array != NULL, barray->n_nodes);
+  BSE_ASSERT_RETURN (node_in_array != NULL, barray->n_nodes);
 
   distance /= bconfig->sizeof_node;
 
@@ -187,7 +187,7 @@ g_bsearch_array_grow (GBSearchArray        *barray,
   guint new_size = old_size + bconfig->sizeof_node;
   guint8 *node;
 
-  RAPICORN_ASSERT_RETURN (index <= barray->n_nodes, NULL);
+  BSE_ASSERT_RETURN (index <= barray->n_nodes, NULL);
 
   if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2))
     {
@@ -251,7 +251,7 @@ g_bsearch_array_remove (GBSearchArray        *barray,
 {
   guint8 *node;
 
-  RAPICORN_ASSERT_RETURN (index < barray->n_nodes, NULL);
+  BSE_ASSERT_RETURN (index < barray->n_nodes, NULL);
 
   barray->n_nodes -= 1;
   node = G_BSEARCH_ARRAY_NODES (barray) + index * bconfig->sizeof_node;
@@ -284,7 +284,7 @@ static inline void
 g_bsearch_array_free (GBSearchArray        *barray,
                       const GBSearchConfig *bconfig)
 {
-  RAPICORN_ASSERT_RETURN (barray != NULL);
+  BSE_ASSERT_RETURN (barray != NULL);
 
   g_free (barray);
 }
diff --git a/sfi/sficxx.hh b/sfi/sficxx.hh
index 13f3cef..af0bd68 100644
--- a/sfi/sficxx.hh
+++ b/sfi/sficxx.hh
@@ -611,7 +611,7 @@ public:
   void
   unref ()
   {
-    RAPICORN_ASSERT_RETURN (block != NULL && block->ref_count > 1);
+    BSE_ASSERT_RETURN (block != NULL && block->ref_count > 1);
     sfi_fblock_unref (block);
   }
   void
@@ -752,7 +752,7 @@ public:
   void
   unref ()
   {
-    RAPICORN_ASSERT_RETURN (block != NULL && block->ref_count > 1);
+    BSE_ASSERT_RETURN (block != NULL && block->ref_count > 1);
     sfi_bblock_unref (block);
   }
   void resize (unsigned int length)
@@ -883,7 +883,7 @@ public:
   void
   unref ()
   {
-    RAPICORN_ASSERT_RETURN (crec != NULL && crec->ref_count > 1);
+    BSE_ASSERT_RETURN (crec != NULL && crec->ref_count > 1);
     sfi_rec_unref (crec);
   }
   void
@@ -989,13 +989,13 @@ public:
   void
   ref ()
   {
-    RAPICORN_ASSERT_RETURN (cobj != NULL && cobj->ref_count > 0);
+    BSE_ASSERT_RETURN (cobj != NULL && cobj->ref_count > 0);
     g_object_ref (cobj);
   }
   void
   unref ()
   {
-    RAPICORN_ASSERT_RETURN (cobj != NULL && cobj->ref_count > 1);
+    BSE_ASSERT_RETURN (cobj != NULL && cobj->ref_count > 1);
     g_object_unref (cobj);
   }
   void
diff --git a/sfi/sfivisitors.hh b/sfi/sfivisitors.hh
index d51af57..91475c4 100644
--- a/sfi/sfivisitors.hh
+++ b/sfi/sfivisitors.hh
@@ -361,7 +361,7 @@ sfi_pspecs_fields_from_accessor_visitable (Visitable &visitable)
   sfi_pspecs_acs_fields_cache (typeid (Visitable), &pspecsp, true);
   pspecsp = NULL;
   bool success = sfi_pspecs_acs_fields_cache (typeid (Visitable), &pspecsp);
-  RAPICORN_ASSERT (success && pspecsp);
+  BSE_ASSERT_RETURN (success && pspecsp, *pspecsp);
   return *pspecsp;
 }
 


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