[beast] BSE: Use fully namespaced assertion macros in headers.
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast] BSE: Use fully namespaced assertion macros in headers.
- Date: Wed, 14 Oct 2015 13:44:53 +0000 (UTC)
commit 90b3556440c76d7bd9b2b4715251a940b4950eb9
Author: Stefan Westerfeld <stefan space twc de>
Date: Wed Oct 14 15:17:22 2015 +0200
BSE: Use fully namespaced assertion macros in headers.
For instance assert_return is replaced by RAPICORN_ASSERT_RETURN.
Signed-off-by: Stefan Westerfeld <stefan space twc de>
Signed-off-by: Tim Janik <timj gnu org>
bse/bsecxxplugin.hh | 2 +-
bse/bsecxxutils.hh | 2 +-
bse/bseitem.hh | 8 ++++----
bse/bseresampler.hh | 2 +-
bse/bseresamplerimpl.hh | 8 ++++----
bse/gsldatautils.hh | 12 ++++++------
6 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/bse/bsecxxplugin.hh b/bse/bsecxxplugin.hh
index 60636bb..d59c3cd 100644
--- a/bse/bsecxxplugin.hh
+++ b/bse/bsecxxplugin.hh
@@ -121,7 +121,7 @@ extern ::BseExportIdentity bse_builtin_export_identity; /* sync with bseplugin.h
if (!values[0].value_name) { \
GEnumValue *v = values; \
ICode; /* initializes values via *v++ = ...; */ \
- assert (v == values + N); \
+ RAPICORN_ASSERT (v == values + N); \
*v++ = ::Bse::EnumValue (0, 0, 0); /* NULL termination */ \
} \
return values; \
diff --git a/bse/bsecxxutils.hh b/bse/bsecxxutils.hh
index b455750..1830d77 100644
--- a/bse/bsecxxutils.hh
+++ b/bse/bsecxxutils.hh
@@ -158,7 +158,7 @@ bse_type_id_wrapper (const char *type_name)
if (!type)
{
type = g_type_from_name (type_name);
- assert (type);
+ RAPICORN_ASSERT (type);
}
return type;
}
diff --git a/bse/bseitem.hh b/bse/bseitem.hh
index 8a2f38a..dd449ce 100644
--- a/bse/bseitem.hh
+++ b/bse/bseitem.hh
@@ -172,7 +172,7 @@ public:
template<typename ItemT, typename... FuncArgs, typename... CallArgs> void
push_undo (const String &blurb, ItemT &self, ErrorType (ItemT::*function) (FuncArgs...), CallArgs... args)
{
- assert_return (this == &self);
+ RAPICORN_ASSERT_RETURN (this == &self);
UndoLambda lambda = [function, args...] (ItemImpl &item, BseUndoStack *ustack) {
ItemT &self = dynamic_cast<ItemT&> (item);
return (self.*function) (args...);
@@ -182,7 +182,7 @@ public:
template<typename ItemT, typename R, typename... FuncArgs, typename... CallArgs> void
push_undo (const String &blurb, ItemT &self, R (ItemT::*function) (FuncArgs...), CallArgs... args)
{
- assert_return (this == &self);
+ RAPICORN_ASSERT_RETURN (this == &self);
UndoLambda lambda = [function, args...] (ItemImpl &item, BseUndoStack *ustack) {
ItemT &self = dynamic_cast<ItemT&> (item);
(self.*function) (args...); // ignoring return type R
@@ -194,7 +194,7 @@ public:
push_undo (const String &blurb, ItemT &self, const ItemTLambda &itemt_lambda)
{
const std::function<ErrorType (ItemT &item, BseUndoStack *ustack)> &undo_lambda = itemt_lambda;
- assert_return (this == &self);
+ RAPICORN_ASSERT_RETURN (this == &self);
UndoLambda lambda = [undo_lambda] (ItemImpl &item, BseUndoStack *ustack) {
ItemT &self = dynamic_cast<ItemT&> (item);
return undo_lambda (self, ustack);
@@ -205,7 +205,7 @@ public:
push_undo_to_redo (const String &blurb, ItemT &self, const ItemTLambda &itemt_lambda)
{ // push itemt_lambda as undo step when this undo step is executed (i.e. itemt_lambda is for redo)
const std::function<ErrorType (ItemT &item, BseUndoStack *ustack)> &undo_lambda = itemt_lambda;
- assert_return (this == &self);
+ RAPICORN_ASSERT_RETURN (this == &self);
auto lambda = [blurb, undo_lambda] (ItemT &self, BseUndoStack *ustack) -> ErrorType {
self.push_undo (blurb, self, undo_lambda);
return ERROR_NONE;
diff --git a/bse/bseresampler.hh b/bse/bseresampler.hh
index 516e4e3..fac1b9c 100644
--- a/bse/bseresampler.hh
+++ b/bse/bseresampler.hh
@@ -109,7 +109,7 @@ protected:
taps[i] = d[i] * scaling;
Resampler2 *filter = new Filter (taps);
- assert (order == filter->order());
+ RAPICORN_ASSERT (order == filter->order());
return filter;
}
/* creates the actual implementation; specifying USE_SSE=true will use
diff --git a/bse/bseresamplerimpl.hh b/bse/bseresamplerimpl.hh
index 12f2d12..094c575 100644
--- a/bse/bseresamplerimpl.hh
+++ b/bse/bseresamplerimpl.hh
@@ -98,7 +98,7 @@ fir_process_4samples_sse (const float *input,
*out2 = out2_v.f[0] + out2_v.f[1] + out2_v.f[2] + out2_v.f[3];
*out3 = out3_v.f[0] + out3_v.f[1] + out3_v.f[2] + out3_v.f[3];
#else
- assert_unreached();
+ RAPICORN_ASSERT_UNREACHED();
#endif
}
@@ -289,7 +289,7 @@ public:
history (2 * ORDER),
sse_taps (fir_compute_sse_taps (taps))
{
- assert ((ORDER & 1) == 0); /* even order filter */
+ RAPICORN_ASSERT ((ORDER & 1) == 0); /* even order filter */
}
/**
* The function process_block() takes a block of input samples and produces a
@@ -428,7 +428,7 @@ public:
history_odd (2 * ORDER),
sse_taps (fir_compute_sse_taps (taps))
{
- assert ((ORDER & 1) == 0); /* even order filter */
+ RAPICORN_ASSERT ((ORDER & 1) == 0); /* even order filter */
}
/**
* The function process_block() takes a block of input samples and produces
@@ -439,7 +439,7 @@ public:
guint n_input_samples,
float *output)
{
- assert ((n_input_samples & 1) == 0);
+ RAPICORN_ASSERT ((n_input_samples & 1) == 0);
const uint BLOCKSIZE = 1024;
diff --git a/bse/gsldatautils.hh b/bse/gsldatautils.hh
index af0691a..5884558 100644
--- a/bse/gsldatautils.hh
+++ b/bse/gsldatautils.hh
@@ -373,7 +373,7 @@ gsl_conv_from_float (GslWaveFormatType format,
while (u32src < u32bound);
return n_values * 4;
default:
- assert_unreached ();
+ RAPICORN_ASSERT_UNREACHED();
return 0;
}
}
@@ -604,7 +604,7 @@ gsl_conv_from_float_clip (GslWaveFormatType format,
while (u32src < u32bound);
return n_values << 2;
default:
- assert_unreached ();
+ RAPICORN_ASSERT_UNREACHED();
return 0;
}
}
@@ -823,7 +823,7 @@ gsl_conv_to_float (GslWaveFormatType format,
while (u32dest < u32bound);
break;
default:
- assert_unreached ();
+ RAPICORN_ASSERT_UNREACHED();
}
}
@@ -1030,7 +1030,7 @@ gsl_conv_from_double (GslWaveFormatType format,
while (u32src < u32bound);
return n_values << 2;
default:
- assert_unreached ();
+ RAPICORN_ASSERT_UNREACHED();
return 0;
}
}
@@ -1261,7 +1261,7 @@ gsl_conv_from_double_clip (GslWaveFormatType format,
while (u32src < u32bound);
return n_values << 2;
default:
- assert_unreached ();
+ RAPICORN_ASSERT_UNREACHED();
return 0;
}
}
@@ -1430,7 +1430,7 @@ gsl_conv_to_double (GslWaveFormatType format,
while (u32dest < u32bound);
break;
default:
- assert_unreached ();
+ RAPICORN_ASSERT_UNREACHED();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]