Commit a6371e2e authored by Max Kellermann's avatar Max Kellermann

configure.ac: disable C++ exceptions

We don't use exceptions currently. Since allowing exceptions means a lot of overhead, this commit disables the feature.
parent 7768baa4
...@@ -1541,6 +1541,7 @@ if test "x$enable_debug" = xno; then ...@@ -1541,6 +1541,7 @@ if test "x$enable_debug" = xno; then
AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden]) AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics]) AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics])
AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants]) AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants])
AX_APPEND_COMPILE_FLAGS([-fno-exceptions])
AC_LANG_POP AC_LANG_POP
AX_APPEND_LINK_FLAGS([-Wl,--gc-sections]) AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])
......
...@@ -13,11 +13,9 @@ class dxd ...@@ -13,11 +13,9 @@ class dxd
{ {
dsd2pcm_ctx *handle; dsd2pcm_ctx *handle;
public: public:
dxd() : handle(dsd2pcm_init()) dxd() : handle(dsd2pcm_init()) {}
{ if (!handle) throw std::runtime_error("wtf?!"); }
dxd(dxd const& x) : handle(dsd2pcm_clone(x.handle)) dxd(dxd const& x) : handle(dsd2pcm_clone(x.handle)) {}
{ if (!handle) throw std::runtime_error("wtf?!"); }
~dxd() { dsd2pcm_destroy(handle); } ~dxd() { dsd2pcm_destroy(handle); }
......
...@@ -14,14 +14,12 @@ class noise_shaper ...@@ -14,14 +14,12 @@ class noise_shaper
public: public:
noise_shaper(int sos_count, const float *bbaa) noise_shaper(int sos_count, const float *bbaa)
{ {
if (noise_shape_init(&ctx,sos_count,bbaa)) noise_shape_init(&ctx, sos_count, bbaa);
throw std::runtime_error("noise shaper initialization failed");
} }
noise_shaper(noise_shaper const& x) noise_shaper(noise_shaper const& x)
{ {
if (noise_shape_clone(&x.ctx,&ctx)) noise_shape_clone(&x.ctx,&ctx);
throw std::runtime_error("noise shaper initialization failed");
} }
~noise_shaper() ~noise_shaper()
...@@ -31,8 +29,7 @@ public: ...@@ -31,8 +29,7 @@ public:
{ {
if (this != &x) { if (this != &x) {
noise_shape_destroy(&ctx); noise_shape_destroy(&ctx);
if (noise_shape_clone(&x.ctx,&ctx)) noise_shape_clone(&x.ctx,&ctx);
throw std::runtime_error("noise shaper initialization failed");
} }
return *this; return *this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment