[beast: 14/43] TOOLS: only use Bse::assert_return{_unreached}
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 14/43] TOOLS: only use Bse::assert_return{_unreached}
- Date: Mon, 26 Jun 2017 23:28:28 +0000 (UTC)
commit 2110108e93d67cd7993242c854d1b4a4d3237722
Author: Tim Janik <timj gnu org>
Date: Sun Jun 25 16:02:14 2017 +0200
TOOLS: only use Bse::assert_return{_unreached}
Signed-off-by: Tim Janik <timj gnu org>
tools/bsefextract.cc | 4 ++--
tools/bsewavetool.cc | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tools/bsefextract.cc b/tools/bsefextract.cc
index 1fcf3b7..7e32f22 100644
--- a/tools/bsefextract.cc
+++ b/tools/bsefextract.cc
@@ -84,7 +84,7 @@ class AudioSignal
{
if (m_length < m_n_channels)
{
- assert (m_length == 0);
+ assert_return (m_length == 0, false);
return true;
}
return false;
@@ -330,7 +330,7 @@ struct SpectrumFeature : public Feature
build_frequency_vector (double *samples)
{
const size_t size = window.size();
- assert (size > 0);
+ assert_return (size > 0, vector<double>());
vector<double> fvector;
double in[size], c[size + 2], *im;
diff --git a/tools/bsewavetool.cc b/tools/bsewavetool.cc
index 63c229b..d0878c1 100644
--- a/tools/bsewavetool.cc
+++ b/tools/bsewavetool.cc
@@ -367,7 +367,7 @@ public:
key_string += 'a' + digit - 10 - 26;
key_uint /= 62;
}
- assert (key_uint == 0);
+ assert_return (key_uint == 0, "");
return key_string;
}
@@ -2239,8 +2239,8 @@ public:
chunk_data.iterators.push_back (it);
}
- assert (chunk_data.sizes.size() > 0);
- assert (chunk_data.sizes.size() == chunk_data.errors.size());
+ assert_return (chunk_data.sizes.size() > 0);
+ assert_return (chunk_data.sizes.size() == chunk_data.errors.size());
ChunkSet chunk_set;
init_empty_set (chunk_data, chunk_set);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]