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
AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics])
AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants])
AX_APPEND_COMPILE_FLAGS([-fno-exceptions])
AC_LANG_POP
AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])
......
......@@ -13,11 +13,9 @@ class dxd
{
dsd2pcm_ctx *handle;
public:
dxd() : handle(dsd2pcm_init())
{ if (!handle) throw std::runtime_error("wtf?!"); }
dxd() : handle(dsd2pcm_init()) {}
dxd(dxd const& x) : handle(dsd2pcm_clone(x.handle))
{ if (!handle) throw std::runtime_error("wtf?!"); }
dxd(dxd const& x) : handle(dsd2pcm_clone(x.handle)) {}
~dxd() { dsd2pcm_destroy(handle); }
......
......@@ -14,14 +14,12 @@ class noise_shaper
public:
noise_shaper(int sos_count, const float *bbaa)
{
if (noise_shape_init(&ctx,sos_count,bbaa))
throw std::runtime_error("noise shaper initialization failed");
noise_shape_init(&ctx, sos_count, bbaa);
}
noise_shaper(noise_shaper const& x)
{
if (noise_shape_clone(&x.ctx,&ctx))
throw std::runtime_error("noise shaper initialization failed");
noise_shape_clone(&x.ctx,&ctx);
}
~noise_shaper()
......@@ -31,8 +29,7 @@ public:
{
if (this != &x) {
noise_shape_destroy(&ctx);
if (noise_shape_clone(&x.ctx,&ctx))
throw std::runtime_error("noise shaper initialization failed");
noise_shape_clone(&x.ctx,&ctx);
}
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