commit 71ffef862895e52ccc205bc513ae3c39b87a9854
parent 086c309651dc7d4aa21ab5647e5414283041668b
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Tue, 18 Mar 2014 18:21:47 -0400
Gcc 4.8 build fix
For some reason the old code would result in a segfault,
which this code fixes
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Params/FilterParams.cpp b/src/Params/FilterParams.cpp
@@ -32,6 +32,9 @@
using namespace rtosc;
+// g++ 4.8 needs this variable saved separately, otherwise it segfaults
+constexpr int sizeof_pvowels = sizeof(FilterParams::Pvowels);
+
#define rObject FilterParams::Pvowels_t::formants_t
static rtosc::Ports subsubports = {
rParam(freq, "Formant frequency"),
@@ -82,7 +85,7 @@ rtosc::Ports FilterParams::ports = {
{"Pvowels", NULL, NULL,
[](const char *, RtData &d) {
FilterParams *obj = (FilterParams *) d.obj;
- d.reply(d.loc, "b", sizeof(FilterParams::Pvowels), obj->Pvowels);
+ d.reply(d.loc, "b", sizeof_pvowels, obj->Pvowels);
}},
{"Pvowels#" STRINGIFY(FF_MAX_VOWELS) "/", NULL, &subports,