[beast: 16/22] BEAST: use Rapicorn's assert() instead of g_assert()
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 16/22] BEAST: use Rapicorn's assert() instead of g_assert()
- Date: Thu, 24 Sep 2015 20:10:18 +0000 (UTC)
commit ebd111cf29057af61a00ec1cbcdc4662cd0abd6c
Author: Tim Janik <timj gnu org>
Date: Mon Sep 21 20:33:45 2015 +0200
BEAST: use Rapicorn's assert() instead of g_assert()
beast-gtk/bstbuseditor.cc | 2 +-
beast-gtk/bstdbmeter.cc | 2 +-
beast-gtk/bstgconfig.cc | 2 +-
beast-gtk/bstkeybindings.cc | 2 +-
beast-gtk/bstknob.cc | 2 +-
beast-gtk/bstmain.cc | 2 +-
beast-gtk/bstmenus.cc | 2 +-
beast-gtk/bstmsgabsorb.cc | 2 +-
beast-gtk/bstparam.cc | 2 +-
beast-gtk/bstpatterncolumns.cc | 4 ++--
beast-gtk/bstplayback.cc | 2 +-
beast-gtk/bstqsampler.cc | 4 ++--
beast-gtk/bstrackeditor-covers.cc | 8 ++++----
beast-gtk/bstrtest.cc | 8 ++++----
beast-gtk/bstscrollgraph.cc | 2 +-
beast-gtk/bstskinconfig.cc | 2 +-
beast-gtk/bstsnetrouter.cc | 2 +-
beast-gtk/bstutils.cc | 4 ++--
beast-gtk/bstwaveeditor.cc | 2 +-
beast-gtk/gxk/gxkaction.cc | 2 +-
beast-gtk/gxk/gxkparam.cc | 2 +-
beast-gtk/gxk/gxkrackcovers.cc | 8 ++++----
beast-gtk/gxk/gxkradget.cc | 10 +++++-----
beast-gtk/gxk/gxkradgetfactory.cc | 2 +-
beast-gtk/gxk/gxkspline.cc | 2 +-
beast-gtk/gxk/gxkutils.cc | 2 +-
26 files changed, 42 insertions(+), 42 deletions(-)
---
diff --git a/beast-gtk/bstbuseditor.cc b/beast-gtk/bstbuseditor.cc
index 0e4cc2c..b8bd33b 100644
--- a/beast-gtk/bstbuseditor.cc
+++ b/beast-gtk/bstbuseditor.cc
@@ -70,7 +70,7 @@ static void
bus_editor_release_item (SfiProxy item,
BstBusEditor *self)
{
- g_assert (self->item == item);
+ assert (self->item == item);
bst_bus_editor_set_bus (self, 0);
}
diff --git a/beast-gtk/bstdbmeter.cc b/beast-gtk/bstdbmeter.cc
index 2dc5803..cdc0d91 100644
--- a/beast-gtk/bstdbmeter.cc
+++ b/beast-gtk/bstdbmeter.cc
@@ -131,7 +131,7 @@ bst_db_setup_get_color (BstDBSetup *dbsetup,
else
offset = i;
}
- g_assert (offset == 0 || pixel >= dbsetup->colors[offset].pixel);
+ assert (offset == 0 || pixel >= dbsetup->colors[offset].pixel);
if (pixel >= dbsetup->colors[offset].pixel && offset + 1 < dbsetup->n_colors)
{ /* linear interpolation */
guint c1 = dbsetup->colors[offset].rgb;
diff --git a/beast-gtk/bstgconfig.cc b/beast-gtk/bstgconfig.cc
index 047f3c0..a94bf5c 100644
--- a/beast-gtk/bstgconfig.cc
+++ b/beast-gtk/bstgconfig.cc
@@ -187,7 +187,7 @@ rc_file_try_statement (gpointer context_data,
GScanner *scanner,
gpointer user_data)
{
- g_assert (scanner->next_token == G_TOKEN_IDENTIFIER);
+ assert (scanner->next_token == G_TOKEN_IDENTIFIER);
if (strcmp (bst_gconfig_pspec ()->name, scanner->next_value.v_identifier) == 0)
{
GValue *value = sfi_value_rec (NULL);
diff --git a/beast-gtk/bstkeybindings.cc b/beast-gtk/bstkeybindings.cc
index b8388ab..ba4a0ae 100644
--- a/beast-gtk/bstkeybindings.cc
+++ b/beast-gtk/bstkeybindings.cc
@@ -645,7 +645,7 @@ key_binding_try_statement (gpointer context_data,
gpointer user_data)
{
GSList *slist, *kbindings = (GSList*) context_data;
- g_assert (scanner->next_token == G_TOKEN_IDENTIFIER);
+ assert (scanner->next_token == G_TOKEN_IDENTIFIER);
for (slist = kbindings; slist; slist = slist->next)
{
BstKeyBinding *kbinding = (BstKeyBinding*) slist->data;
diff --git a/beast-gtk/bstknob.cc b/beast-gtk/bstknob.cc
index cfb0baa..9c8a62b 100644
--- a/beast-gtk/bstknob.cc
+++ b/beast-gtk/bstknob.cc
@@ -598,7 +598,7 @@ bst_knob_init (BstKnob *knob)
knob->old_page_size = 0.0;
knob->adjustment = NULL;
knob->pixbuf = (GdkPixbuf*) g_object_ref (bst_pixbuf_knob ());
- g_assert (knob->pixbuf);
+ assert (knob->pixbuf);
gtk_image_set_from_pixbuf (GTK_IMAGE (knob), knob->pixbuf);
w = gdk_pixbuf_get_width (knob->pixbuf);
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index ddf7e60..f413b9e 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -465,7 +465,7 @@ bst_init_aida_idl()
Bse::TestObjectH test = bse_server.get_test_object();
test.sig_echo_reply() += echo_test_handler;
const int test_result = test.echo_test ("foo");
- g_assert (test_result == 3);
+ assert (test_result == 3);
}
}
diff --git a/beast-gtk/bstmenus.cc b/beast-gtk/bstmenus.cc
index 73da287..1195d46 100644
--- a/beast-gtk/bstmenus.cc
+++ b/beast-gtk/bstmenus.cc
@@ -63,7 +63,7 @@ menu_choice_activate (GtkWidget *item,
if (GTK_IS_MENU_ITEM (tmp))
item = tmp;
}
- g_assert (GTK_IS_MENU (item));
+ assert (GTK_IS_MENU (item));
gtk_object_set_data (GTK_OBJECT (item), "BstChoice", udata);
}
diff --git a/beast-gtk/bstmsgabsorb.cc b/beast-gtk/bstmsgabsorb.cc
index aa13d02..6a86b68 100644
--- a/beast-gtk/bstmsgabsorb.cc
+++ b/beast-gtk/bstmsgabsorb.cc
@@ -278,7 +278,7 @@ msg_absorb_config_try_statement (gpointer context_data,
GScanner *scanner,
gpointer user_data)
{
- g_assert (scanner->next_token == G_TOKEN_IDENTIFIER);
+ assert (scanner->next_token == G_TOKEN_IDENTIFIER);
if (strcmp (bst_msg_absorb_config_pspec()->name, scanner->next_value.v_identifier) == 0)
{
GValue *value = sfi_value_seq (NULL);
diff --git a/beast-gtk/bstparam.cc b/beast-gtk/bstparam.cc
index d3f4fdc..61c958c 100644
--- a/beast-gtk/bstparam.cc
+++ b/beast-gtk/bstparam.cc
@@ -527,7 +527,7 @@ bst_param_xframe_check_button (GxkParam *param,
void
_bst_init_params (void)
{
- g_assert (quark_null_group == 0);
+ assert (quark_null_group == 0);
quark_null_group = g_quark_from_static_string ("bst-param-null-group");
quark_param_choice_values = g_quark_from_static_string ("bst-param-choice-values");
diff --git a/beast-gtk/bstpatterncolumns.cc b/beast-gtk/bstpatterncolumns.cc
index 179910b..4054a84 100644
--- a/beast-gtk/bstpatterncolumns.cc
+++ b/beast-gtk/bstpatterncolumns.cc
@@ -285,7 +285,7 @@ static guint
control_get_digit_increment (guint num_type,
guint nth_digits)
{
- g_assert (nth_digits > 0);
+ assert (nth_digits > 0);
if (num_type == BST_PATTERN_LFLAG_DEC)
return pow (10, nth_digits - 1);
else /* if (num_type == BST_PATTERN_LFLAG_HEX) */
@@ -868,7 +868,7 @@ bst_pattern_column_create (BstPatternLType ltype,
klass = &pattern_column_event_class;
break;
}
- g_assert (klass->instance_size >= sizeof (BstPatternColumn));
+ assert (klass->instance_size >= sizeof (BstPatternColumn));
column = (BstPatternColumn*) g_malloc0 (klass->instance_size);
column->klass = klass;
column->num = num;
diff --git a/beast-gtk/bstplayback.cc b/beast-gtk/bstplayback.cc
index d84f009..9582ac2 100644
--- a/beast-gtk/bstplayback.cc
+++ b/beast-gtk/bstplayback.cc
@@ -107,7 +107,7 @@ wave_oscillator_pcm_notify (BstPlayBackHandle *handle,
{
gboolean discard_next_notify = handle->discard_next_notify;
- g_assert (handle->wosc1 == wosc);
+ assert (handle->wosc1 == wosc);
handle->waiting_for_notify = FALSE;
handle->discard_next_notify = FALSE;
diff --git a/beast-gtk/bstqsampler.cc b/beast-gtk/bstqsampler.cc
index 7ece498..d4fb646 100644
--- a/beast-gtk/bstqsampler.cc
+++ b/beast-gtk/bstqsampler.cc
@@ -450,7 +450,7 @@ bst_qsampler_update_types (BstQSampler *qsampler,
guint rstart = r->offset / qsampler->zoom_factor;
guint rend = last_peek_from_pcm_region (qsampler, r->offset, r->length);
- g_assert (rstart <= rend);
+ assert (rstart <= rend);
/* intersect */
s = MAX (start, rstart);
@@ -468,7 +468,7 @@ bst_qsampler_update_types (BstQSampler *qsampler,
guint mstart = m->offset / qsampler->zoom_factor;
guint mend = last_peek_from_pcm_region (qsampler, m->offset, 1);
- g_assert (mstart <= mend);
+ assert (mstart <= mend);
/* intersect */
s = MAX (start, mstart);
diff --git a/beast-gtk/bstrackeditor-covers.cc b/beast-gtk/bstrackeditor-covers.cc
index c7c3c93..a2fa65e 100644
--- a/beast-gtk/bstrackeditor-covers.cc
+++ b/beast-gtk/bstrackeditor-covers.cc
@@ -162,10 +162,10 @@ rack_cover_add_plates (BstRackTable *rtable)
{
cover = rack_cover_create (GTK_WIDGET (rtable));
plate_list = g_slist_prepend (plate_list, cover);
- g_assert (k < GTK_TABLE (rtable)->ncols);
- g_assert (l < GTK_TABLE (rtable)->nrows);
- g_assert (k + m <= GTK_TABLE (rtable)->ncols);
- g_assert (l + n <= GTK_TABLE (rtable)->nrows);
+ assert (k < GTK_TABLE (rtable)->ncols);
+ assert (l < GTK_TABLE (rtable)->nrows);
+ assert (k + m <= GTK_TABLE (rtable)->ncols);
+ assert (l + n <= GTK_TABLE (rtable)->nrows);
bst_rack_child_set_info (cover, k, l, m, n);
gtk_container_add (GTK_CONTAINER (rtable), cover);
}
diff --git a/beast-gtk/bstrtest.cc b/beast-gtk/bstrtest.cc
index 732cc25..cef2677 100644
--- a/beast-gtk/bstrtest.cc
+++ b/beast-gtk/bstrtest.cc
@@ -163,10 +163,10 @@ add_plates (BstRackTable *rtable)
{
cover = make_cover (GTK_WIDGET (rtable));
plate_list = g_slist_prepend (plate_list, cover);
- g_assert (k < GTK_TABLE (rtable)->ncols);
- g_assert (l < GTK_TABLE (rtable)->nrows);
- g_assert (k + m <= GTK_TABLE (rtable)->ncols);
- g_assert (l + n <= GTK_TABLE (rtable)->nrows);
+ assert (k < GTK_TABLE (rtable)->ncols);
+ assert (l < GTK_TABLE (rtable)->nrows);
+ assert (k + m <= GTK_TABLE (rtable)->ncols);
+ assert (l + n <= GTK_TABLE (rtable)->nrows);
bst_rack_widget_set_info (cover, k, l, m, n);
gtk_container_add (GTK_CONTAINER (rtable), cover);
}
diff --git a/beast-gtk/bstscrollgraph.cc b/beast-gtk/bstscrollgraph.cc
index af01224..5bc4c4e 100644
--- a/beast-gtk/bstscrollgraph.cc
+++ b/beast-gtk/bstscrollgraph.cc
@@ -443,7 +443,7 @@ static void
bst_scrollgraph_release_item (SfiProxy item,
BstScrollgraph *self)
{
- g_assert (self->source == item);
+ assert (self->source == item);
bst_scrollgraph_set_source (self, 0, 0);
if (self->delete_toplevel)
gxk_toplevel_delete (GTK_WIDGET (self));
diff --git a/beast-gtk/bstskinconfig.cc b/beast-gtk/bstskinconfig.cc
index d36b62f..041be2c 100644
--- a/beast-gtk/bstskinconfig.cc
+++ b/beast-gtk/bstskinconfig.cc
@@ -238,7 +238,7 @@ skin_file_try_statement (gpointer context_data,
gpointer user_data)
{
const char *absname = (const char*) user_data;
- g_assert (scanner->next_token == G_TOKEN_IDENTIFIER);
+ assert (scanner->next_token == G_TOKEN_IDENTIFIER);
if (strcmp (bst_skin_config_pspec()->name, scanner->next_value.v_identifier) == 0)
{
GValue *value = sfi_value_rec (NULL);
diff --git a/beast-gtk/bstsnetrouter.cc b/beast-gtk/bstsnetrouter.cc
index a9e4f24..4c62786 100644
--- a/beast-gtk/bstsnetrouter.cc
+++ b/beast-gtk/bstsnetrouter.cc
@@ -1094,7 +1094,7 @@ bst_snet_router_init (BstSNetRouter *self)
if (cat->icon)
{
BseIc0n *icon = cat->icon;
- g_assert (icon->width * icon->height == int (icon->pixel_seq->n_pixels));
+ assert (icon->width * icon->height == int (icon->pixel_seq->n_pixels));
bst_stock_register_icon (cat->category, 4,
icon->width, icon->height,
icon->width * 4,
diff --git a/beast-gtk/bstutils.cc b/beast-gtk/bstutils.cc
index 93cd4c6..05378d7 100644
--- a/beast-gtk/bstutils.cc
+++ b/beast-gtk/bstutils.cc
@@ -28,7 +28,7 @@ Bse::ServerH bse_server;
void
_bst_init_utils (void)
{
- g_assert (stock_icon_factory == NULL);
+ assert (stock_icon_factory == NULL);
stock_icon_factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (stock_icon_factory);
@@ -456,7 +456,7 @@ bst_action_list_add_cat (GxkActionList *alist,
if (cat->icon)
{
BseIc0n *icon = cat->icon;
- g_assert (icon->width * icon->height == int (icon->pixel_seq->n_pixels));
+ assert (icon->width * icon->height == int (icon->pixel_seq->n_pixels));
bst_stock_register_icon (cat->category, 4,
icon->width, icon->height,
icon->width * 4,
diff --git a/beast-gtk/bstwaveeditor.cc b/beast-gtk/bstwaveeditor.cc
index f0665b3..f2be102 100644
--- a/beast-gtk/bstwaveeditor.cc
+++ b/beast-gtk/bstwaveeditor.cc
@@ -574,7 +574,7 @@ tree_selection_changed (BstWaveEditor *self,
gchar *osc_str, *mix_str;
SfiProxy esample;
- g_assert (self->chunk_wrapper == (GxkListWrapper*) model);
+ assert (self->chunk_wrapper == (GxkListWrapper*) model);
gtk_tree_model_get (model, &iter,
COL_OSC_FREQ, &osc_str,
diff --git a/beast-gtk/gxk/gxkaction.cc b/beast-gtk/gxk/gxkaction.cc
index 316b7f6..17c4e11 100644
--- a/beast-gtk/gxk/gxkaction.cc
+++ b/beast-gtk/gxk/gxkaction.cc
@@ -965,7 +965,7 @@ gxk_action_group_dispose (GxkActionGroup *self)
void
gxk_init_actions (void)
{
- g_assert (action_class_ht == NULL);
+ assert (action_class_ht == NULL);
action_class_ht = g_hash_table_new (action_class_hash, action_class_equals);
quark_action_links = g_quark_from_static_string ("gxk-action-links");
quark_action_factories = g_quark_from_static_string ("GxkActionFactory-list");
diff --git a/beast-gtk/gxk/gxkparam.cc b/beast-gtk/gxk/gxkparam.cc
index af549fd..d019ab8 100644
--- a/beast-gtk/gxk/gxkparam.cc
+++ b/beast-gtk/gxk/gxkparam.cc
@@ -805,7 +805,7 @@ guint
gxk_param_create_size_group (void)
{
guint i;
- g_assert (n_size_groups < 0xff);
+ assert (n_size_groups < 0xff);
i = n_size_groups++;
size_groups = g_renew (GxkParamEditorSizes, size_groups, n_size_groups);
size_groups[i] = param_editor_default_sizes;
diff --git a/beast-gtk/gxk/gxkrackcovers.cc b/beast-gtk/gxk/gxkrackcovers.cc
index 45d6d67..f1ddba0 100644
--- a/beast-gtk/gxk/gxkrackcovers.cc
+++ b/beast-gtk/gxk/gxkrackcovers.cc
@@ -174,10 +174,10 @@ rack_cover_add_plates (GxkRackTable *rtable)
{
cover = rack_cover_create (GTK_WIDGET (rtable));
plate_list = g_slist_prepend (plate_list, cover);
- g_assert (k < GTK_TABLE (rtable)->ncols);
- g_assert (l < GTK_TABLE (rtable)->nrows);
- g_assert (k + m <= GTK_TABLE (rtable)->ncols);
- g_assert (l + n <= GTK_TABLE (rtable)->nrows);
+ assert (k < GTK_TABLE (rtable)->ncols);
+ assert (l < GTK_TABLE (rtable)->nrows);
+ assert (k + m <= GTK_TABLE (rtable)->ncols);
+ assert (l + n <= GTK_TABLE (rtable)->nrows);
gxk_rack_table_attach (rtable, cover, k, l, m, n);
}
}
diff --git a/beast-gtk/gxk/gxkradget.cc b/beast-gtk/gxk/gxkradget.cc
index 42240d1..802a672 100644
--- a/beast-gtk/gxk/gxkradget.cc
+++ b/beast-gtk/gxk/gxkradget.cc
@@ -199,7 +199,7 @@ clone_node_intern (Node *source,
}
if (source->xdef_node)
{
- g_assert (!inherit);
+ assert (!inherit);
node->xdef_node = clone_list_find (clist, source->xdef_node);
node->xdef_depth = source->xdef_depth;
}
@@ -228,7 +228,7 @@ clone_node_intern (Node *source,
else
node->children = last = g_slist_new (child);
}
- g_assert (source->call_stack == NULL);
+ assert (source->call_stack == NULL);
return node;
}
@@ -680,7 +680,7 @@ node_define (Domain *domain,
{
node = clone_node (source, domain->domain, node_name, inherit);
node->xdef_node = xdef_node;
- g_assert (xdef_node && !xdef_node->xdef_node);
+ assert (xdef_node && !xdef_node->xdef_node);
node->xdef_depth = node->xdef_node->depth;
}
else for (i = 0; attribute_names[i]; i++) /* node inheritance */
@@ -1011,7 +1011,7 @@ radget_widget_hierarchy_changed (GtkWidget *widget,
if (!hgroup && !vgroup && !bgroup)
return;
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
- g_assert (GTK_WIDGET_TOPLEVEL (toplevel));
+ assert (GTK_WIDGET_TOPLEVEL (toplevel));
if (hgroup)
{
GtkSizeGroup *sg = toplevel_get_size_group (toplevel, hgroup, 'h');
@@ -1850,7 +1850,7 @@ void
gxk_init_radget_types (void)
{
GType types[1024], *t = types;
- g_assert (quark_radget_type == 0);
+ assert (quark_radget_type == 0);
quark_id = g_quark_from_static_string ("id");
quark_name = g_quark_from_static_string ("name");
quark_radget_type = g_quark_from_static_string ("GxkRadget-type");
diff --git a/beast-gtk/gxk/gxkradgetfactory.cc b/beast-gtk/gxk/gxkradgetfactory.cc
index 374f411..bdf0bd8 100644
--- a/beast-gtk/gxk/gxkradgetfactory.cc
+++ b/beast-gtk/gxk/gxkradgetfactory.cc
@@ -129,7 +129,7 @@ gxk_radget_factory_finalize (GObject *object)
{
GxkRadgetFactory *self = GXK_RADGET_FACTORY (object);
- g_assert (self->window == NULL);
+ assert (self->window == NULL);
g_datalist_clear (&self->branch_widgets);
g_free (self->action_root);
g_free (self->per_action);
diff --git a/beast-gtk/gxk/gxkspline.cc b/beast-gtk/gxk/gxkspline.cc
index 794300d..210c961 100644
--- a/beast-gtk/gxk/gxkspline.cc
+++ b/beast-gtk/gxk/gxkspline.cc
@@ -197,7 +197,7 @@ gxk_spline_eval (const GxkSpline *spline,
else
first = i;
}
- g_assert (first + 1 == last);
+ assert (first + 1 == last);
/* eval polynomials */
double y = segment_eval (spline->segs + first, x, yd1);
return y;
diff --git a/beast-gtk/gxk/gxkutils.cc b/beast-gtk/gxk/gxkutils.cc
index 0e35a98..b414073 100644
--- a/beast-gtk/gxk/gxkutils.cc
+++ b/beast-gtk/gxk/gxkutils.cc
@@ -641,7 +641,7 @@ gxk_color_dots_interpolate (GxkColorDots *cdots,
else
offset = i;
}
- g_assert (offset == 0 || value >= cdots->colors[offset].value);
+ assert (offset == 0 || value >= cdots->colors[offset].value);
if (value >= cdots->colors[offset].value && offset + 1 < cdots->n_colors)
{ /* linear interpolation */
guint c1 = cdots->colors[offset].rgb;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]