[beast: 8/22] PLUGINS: use Rapicorn's assert_return()
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 8/22] PLUGINS: use Rapicorn's assert_return()
- Date: Thu, 24 Sep 2015 20:09:38 +0000 (UTC)
commit 2aac143aa85f7068d2b0908393228b6c0da27989
Author: Tim Janik <timj gnu org>
Date: Mon Sep 21 19:47:21 2015 +0200
PLUGINS: use Rapicorn's assert_return()
plugins/bsefirfilter.c | 2 +-
plugins/bsenoise.cc | 4 ++--
plugins/davguitar.c | 4 ++--
plugins/evaluator/cpu.cc | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/bsefirfilter.c b/plugins/bsefirfilter.c
index c9127a6..03fe27d 100644
--- a/plugins/bsefirfilter.c
+++ b/plugins/bsefirfilter.c
@@ -370,7 +370,7 @@ bse_fir_filter_calc_chunk (BseSource *source,
gfloat *coeffs;
guint i, n_coeffs, history_pos;
- g_return_val_if_fail (ochannel_id == BSE_FIR_FILTER_OCHANNEL_MONO, NULL);
+ assert_return (ochannel_id == BSE_FIR_FILTER_OCHANNEL_MONO, NULL);
input = bse_source_get_input (source, BSE_FIR_FILTER_ICHANNEL_MONO); /* mono */
if (!input) /* silence */
diff --git a/plugins/bsenoise.cc b/plugins/bsenoise.cc
index 0049552..d74da8f 100644
--- a/plugins/bsenoise.cc
+++ b/plugins/bsenoise.cc
@@ -63,7 +63,7 @@ class Noise : public NoiseBase {
void
process (unsigned int n_values)
{
- g_return_if_fail (n_values <= block_size()); /* paranoid */
+ assert_return (n_values <= block_size()); /* paranoid */
if (allow_randomization) /* fast */
{
@@ -98,7 +98,7 @@ public:
void
reset1()
{
- g_return_if_fail (noise_data_ref_count > 0);
+ assert_return (noise_data_ref_count > 0);
noise_data_ref_count--;
if (noise_data_ref_count == 0)
diff --git a/plugins/davguitar.c b/plugins/davguitar.c
index 6834544..bf90983 100644
--- a/plugins/davguitar.c
+++ b/plugins/davguitar.c
@@ -325,7 +325,7 @@ dav_guitar_do_destroy (BseObject *object)
static void
dav_guitar_trigger_string (DavGuitar *guitar, int str)
{
- g_return_if_fail (DAV_IS_GUITAR (guitar));
+ assert_return (DAV_IS_GUITAR (guitar));
wave_guide_pluck (&guitar->strings[str], guitar->metallic_factor, guitar->snap_factor,
guitar->trigger_vel);
wave_guide_unstop (&guitar->body);
@@ -588,7 +588,7 @@ dav_guitar_calc_chunk (BseSource *source,
gfloat sample;
guint i, j;
- g_return_val_if_fail (ochannel_id == DAV_GUITAR_OCHANNEL_MONO, NULL);
+ assert_return (ochannel_id == DAV_GUITAR_OCHANNEL_MONO, NULL);
hunk = bse_hunk_alloc (1);
diff --git a/plugins/evaluator/cpu.cc b/plugins/evaluator/cpu.cc
index ee8d04d..8d1be8c 100644
--- a/plugins/evaluator/cpu.cc
+++ b/plugins/evaluator/cpu.cc
@@ -69,8 +69,8 @@ void CPU::execute()
void CPU::execute_1_1_block(int sreg, int dreg, const float *sdata, float *ddata, int samples)
{
- assert(sreg >= 0 && sreg <= n_registers); /* g_return_if_fail */
- assert(dreg >= 0 && dreg <= n_registers); /* g_return_if_fail */
+ assert(sreg >= 0 && sreg <= n_registers); /* assert_return */
+ assert(dreg >= 0 && dreg <= n_registers); /* assert_return */
for(int i = 0; i < samples; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]