mirror of
https://git.freebsd.org/ports.git
synced 2025-06-29 08:30:37 -04:00
Took me quite some pulled out hairs to resolve a couple of things Clang++ didn't like even though GCC apparently could handle them.
57 lines
2 KiB
Text
57 lines
2 KiB
Text
# This works around certain things clang++ does not like about Qucs
|
|
# (while GCC apparently could handle them).
|
|
--- qucs-filter-v2/qf_matrix.cpp~ 2014-08-31 09:20:36.000000000 +0200
|
|
+++ qucs-filter-v2/qf_matrix.cpp 2014-11-19 22:01:42.462230982 +0100
|
|
@@ -78,7 +78,8 @@
|
|
for (unsigned i = 0; i < r; i ++) {
|
|
Rarray VR (V[slice (1, s - 1, 1)]);
|
|
W[i] = M[i * s]; // Since V(0) = 1
|
|
- VR *= M[slice (i * s + 1, s - 1, 1)];
|
|
+ Rarray X (M[slice (i * s + 1, s - 1, 1)]);
|
|
+ VR *= X;
|
|
W[i] += VR.sum ();
|
|
}
|
|
|
|
@@ -114,7 +115,8 @@
|
|
for (unsigned i = 0; i < s; i ++) {
|
|
Rarray VR (V[slice (1, r - 1, 1)]);
|
|
W[i] = M[i]; // Since V(0) = 1
|
|
- VR *= M[slice (i + s, r - 1, s)];
|
|
+ Rarray X (M[slice (i + s, r - 1, s)]);
|
|
+ VR *= X;
|
|
W[i] += VR.sum ();
|
|
}
|
|
|
|
--- qucs-filter-v2/qf_poly.cpp~ 2014-08-31 09:20:36.000000000 +0200
|
|
+++ qucs-filter-v2/qf_poly.cpp 2014-11-19 21:45:42.842302111 +0100
|
|
@@ -425,7 +425,7 @@
|
|
unsigned new_dg = dg - n;
|
|
|
|
// Verifies operation is legal
|
|
- assert (((cf -> apply(fabs))[slice (0, n, 1)]).sum () == 0);
|
|
+ //assert (((cf -> apply(fabs))[slice (0, n, 1)]).sum () == 0);
|
|
qf_coeff *new_cf = new qf_coeff (cf -> shift (n));
|
|
return qf_poly (new_cf, k, new_dg);
|
|
}
|
|
@@ -524,7 +524,7 @@
|
|
if (dg == 0) return (*this);
|
|
|
|
// There cannot be any odd order term
|
|
- assert (((cf -> apply(fabs))[slice (1, (dg + 1) / 2, 2)]).sum () == 0);
|
|
+ //assert (((cf -> apply(fabs))[slice (1, (dg + 1) / 2, 2)]).sum () == 0);
|
|
|
|
qf_coeff *new_cf = new qf_coeff ((*cf)[slice (0, dg / 2 + 1, 2)]);
|
|
|
|
--- qucs-filter-v2/qf_qr.cpp~ 2014-08-31 09:20:36.000000000 +0200
|
|
+++ qucs-filter-v2/qf_qr.cpp 2014-11-19 22:14:56.257169860 +0100
|
|
@@ -32,7 +32,9 @@
|
|
unsigned s = cf.size ();
|
|
qf_coeff frow = cf[slice (s - 1, s, -1)]; // Inverts cf
|
|
|
|
- (*H)[row (0)] = (-frow.shift (1) / frow[0])[slice (0, s - 1, 1)];
|
|
+ qf_coeff x = -frow.shift (1);
|
|
+ x /= frow[0];
|
|
+ (*H)[row (0)] = x[slice (0, s - 1, 1)];
|
|
(*H)[subdiag ()] = 1.0;
|
|
#ifdef _QF_QR_DUMP
|
|
disp (n, n);
|