[beast: 37/43] PLUGINS: use assert_return_unreached() instead of g_error
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 37/43] PLUGINS: use assert_return_unreached() instead of g_error
- Date: Mon, 26 Jun 2017 23:30:24 +0000 (UTC)
commit e6ae3c9d404c65f805b308ab3726596bfd88650a
Author: Tim Janik <timj gnu org>
Date: Mon Jun 26 02:07:49 2017 +0200
PLUGINS: use assert_return_unreached() instead of g_error
Signed-off-by: Tim Janik <timj gnu org>
plugins/bsesimpleadsr.cc | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plugins/bsesimpleadsr.cc b/plugins/bsesimpleadsr.cc
index fc4cd0a..300f68f 100644
--- a/plugins/bsesimpleadsr.cc
+++ b/plugins/bsesimpleadsr.cc
@@ -283,7 +283,7 @@ simple_adsr_process (BseModule *module,
case BSE_MIX_RAMP_REACHED_BORDER: env->phase = DECAY; break;
case BSE_MIX_RAMP_GATE_CHANGE: env->phase = RELEASE; break;
case BSE_MIX_RAMP_REACHED_BOUND: break;
- default: g_error ("should not be reached: state: %d\n", state);
+ default: assert_return_unreached();
}
break;
case DECAY:
@@ -296,7 +296,7 @@ simple_adsr_process (BseModule *module,
case BSE_MIX_RAMP_GATE_CHANGE: env->phase = RELEASE; break;
case BSE_MIX_RAMP_RETRIGGER: env->phase = ATTACK; break;
case BSE_MIX_RAMP_REACHED_BOUND: break;
- default: g_error ("should not be reached: state: %d\n", state);
+ default: assert_return_unreached();
}
break;
case SUSTAIN:
@@ -309,7 +309,7 @@ simple_adsr_process (BseModule *module,
case BSE_MIX_RAMP_GATE_CHANGE: env->phase = RELEASE; break;
case BSE_MIX_RAMP_RETRIGGER: env->phase = ATTACK; break;
case BSE_MIX_RAMP_REACHED_BOUND: break;
- default: g_error ("should not be reached: state: %d\n", state);
+ default: assert_return_unreached();
}
break;
case RELEASE:
@@ -324,7 +324,7 @@ simple_adsr_process (BseModule *module,
case BSE_MIX_RAMP_RETRIGGER:
case BSE_MIX_RAMP_GATE_CHANGE: env->phase = ATTACK; break;
case BSE_MIX_RAMP_REACHED_BOUND: break;
- default: g_error ("should not be reached: state: %d\n", state);
+ default: assert_return_unreached();
}
break;
case POST_RELEASE:
@@ -336,7 +336,7 @@ simple_adsr_process (BseModule *module,
case BSE_MIX_RAMP_RETRIGGER:
case BSE_MIX_RAMP_GATE_CHANGE: env->phase = ATTACK; break;
case BSE_MIX_RAMP_REACHED_BOUND: break;
- default: g_error ("should not be reached: state: %d\n", state);
+ default: assert_return_unreached();
}
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]