Wed Jun 10 15:00:31 2015 UTC ()
Since the code expects boost::array to win, use that explicitly.
(joerg)
diff -r1.5 -r1.6 pkgsrc/math/fityk/distinfo
diff -r0 -r1.1 pkgsrc/math/fityk/patches/patch-src_guess.cpp
--- pkgsrc/math/fityk/distinfo 2014/02/24 12:35:10 1.5
+++ pkgsrc/math/fityk/distinfo 2015/06/10 15:00:31 1.6
| @@ -1,10 +1,11 @@ | | | @@ -1,10 +1,11 @@ |
1 | $NetBSD: distinfo,v 1.5 2014/02/24 12:35:10 wiedi Exp $ | | 1 | $NetBSD: distinfo,v 1.6 2015/06/10 15:00:31 joerg Exp $ |
2 | | | 2 | |
3 | SHA1 (fityk-0.9.7.tar.bz2) = bb4d11b529c6c87c68c6f7359075915caf95a996 | | 3 | SHA1 (fityk-0.9.7.tar.bz2) = bb4d11b529c6c87c68c6f7359075915caf95a996 |
4 | RMD160 (fityk-0.9.7.tar.bz2) = bd403037157b32ec7c7c6972f17116e403d099bc | | 4 | RMD160 (fityk-0.9.7.tar.bz2) = bd403037157b32ec7c7c6972f17116e403d099bc |
5 | Size (fityk-0.9.7.tar.bz2) = 1146628 bytes | | 5 | Size (fityk-0.9.7.tar.bz2) = 1146628 bytes |
6 | SHA1 (patch-aa) = c923919db013ca9ddb8370617bf0b4b0aaa31922 | | 6 | SHA1 (patch-aa) = c923919db013ca9ddb8370617bf0b4b0aaa31922 |
7 | SHA1 (patch-src_GAfit.cpp) = 6543899d3861853d0738bbb5ced2cc9f59fda6db | | 7 | SHA1 (patch-src_GAfit.cpp) = 6543899d3861853d0738bbb5ced2cc9f59fda6db |
8 | SHA1 (patch-src_common.h) = 1ab3f9d0c72c1f4bb0740a22ccc7960fb18b4c90 | | 8 | SHA1 (patch-src_common.h) = 1ab3f9d0c72c1f4bb0740a22ccc7960fb18b4c90 |
9 | SHA1 (patch-src_eparser.cpp) = 6120b71f1bcafc1efc5b774426955084739a42c0 | | 9 | SHA1 (patch-src_eparser.cpp) = 6120b71f1bcafc1efc5b774426955084739a42c0 |
| | | 10 | SHA1 (patch-src_guess.cpp) = 2379b3bc3de4d24a8c5a2781c27b8eeccbb516c2 |
10 | SHA1 (patch-src_wxgui_ceria.cpp) = d3d07180b20b563c67d1bb7316d38ef64ff91a8a | | 11 | SHA1 (patch-src_wxgui_ceria.cpp) = d3d07180b20b563c67d1bb7316d38ef64ff91a8a |
$NetBSD: patch-src_guess.cpp,v 1.1 2015/06/10 15:00:31 joerg Exp $
--- src/guess.cpp.orig 2011-02-08 09:29:00.000000000 +0000
+++ src/guess.cpp
@@ -15,11 +15,10 @@
#include "settings.h"
using namespace std;
-using boost::array;
-const array<string, 3> Guess::linear_traits =
+const boost::array<string, 3> Guess::linear_traits =
{{ "slope", "intercept", "avgy" }};
-const array<string, 4> Guess::peak_traits =
+const boost::array<string, 4> Guess::peak_traits =
{{ "center", "height", "hwhm", "area" }};
Guess::Guess(Settings const *settings) : settings_(settings)
@@ -97,7 +96,7 @@ double Guess::find_hwhm(int pos, double*
// outputs vector with: center, height, hwhm, area
// returns values corresponding to peak_traits
-array<double,4> Guess::estimate_peak_parameters()
+boost::array<double,4> Guess::estimate_peak_parameters()
{
// find the highest point, which must be higher than the previous and next
// points (-> it cannot be the first/last point)
@@ -112,11 +111,11 @@ array<double,4> Guess::estimate_peak_par
double center = xx_[pos];
double area;
double hwhm = find_hwhm(pos, &area) * settings_->width_correction;
- array<double,4> r = {{ center, height, hwhm, area }};
+ boost::array<double,4> r = {{ center, height, hwhm, area }};
return r;
}
-array<double,3> Guess::estimate_linear_parameters()
+boost::array<double,3> Guess::estimate_linear_parameters()
{
double sx = 0, sy = 0, sxx = 0, syy = 0, sxy = 0;
int n = yy_.size();
@@ -132,7 +131,7 @@ array<double,3> Guess::estimate_linear_p
double slope = (n * sxy - sx * sy) / (n * sxx - sx * sx);
double intercept = (sy - slope * sx) / n;
double avgy = sy / n;
- array<double,3> r = {{ slope, intercept, avgy }};
+ boost::array<double,3> r = {{ slope, intercept, avgy }};
return r;
}