Skip to content
Snippets Groups Projects
Commit d08da36d authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Task #8973: fix c++11 compilation errors with pybdsm

parent d0ae9dc6
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ void MGFunction::py_remove_gaussian(int idx)
//
// Get gaussian parameters by index
//
tuple MGFunction::py_get_gaussian(int idx)
boost::python::tuple MGFunction::py_get_gaussian(int idx)
{
if (idx < 0)
idx += m_gaul.size();
......@@ -116,7 +116,7 @@ tuple MGFunction::py_get_gaussian(int idx)
vector<double> &p = m_parameters[idx];
return make_tuple(p[0], p[1], p[2], p[3], p[4], p[5]);
return boost::python::make_tuple(p[0], p[1], p[2], p[3], p[4], p[5]);
}
//
......@@ -171,7 +171,7 @@ list MGFunction::py_get_errors()
for (unsigned i = 0; i < m_gaul.size(); ++i) {
vector<double> &e = m_errors[i];
res.append(make_tuple(e[0], e[1], e[2], e[3], e[4], e[5]));
res.append(boost::python::make_tuple(e[0], e[1], e[2], e[3], e[4], e[5]));
}
return res;
......@@ -180,7 +180,7 @@ list MGFunction::py_get_errors()
//
// Find highest peak in the data-MGFunction residual
//
tuple MGFunction::py_find_peak()
boost::python::tuple MGFunction::py_find_peak()
{
vector<double> buf(data_size());
fcn_diff(&buf.front());
......@@ -197,7 +197,7 @@ tuple MGFunction::py_find_peak()
int x1 = mm_data[pidx].x1;
int x2 = mm_data[pidx].x2;
return make_tuple(peak, make_tuple(x1, x2));
return boost::python::make_tuple(peak, boost::python::make_tuple(x1, x2));
}
......
......@@ -62,7 +62,7 @@ void MGFunction::get_parameters(double *buf) const
{
double *chk = buf;
for (unsigned i = 0; i < m_gaul.size(); ++i) {
copy_n(m_parameters[i].begin(), m_gaul[i], buf);
std::copy_n(m_parameters[i].begin(), m_gaul[i], buf);
buf += m_gaul[i];
}
assert(buf - chk == (int)m_npar);
......@@ -76,7 +76,7 @@ void MGFunction::set_parameters(const double *buf)
{
const double *chk = buf;
for(unsigned i = 0; i < m_gaul.size(); ++i) {
copy_n(buf, m_gaul[i], m_parameters[i].begin());
std::copy_n(buf, m_gaul[i], m_parameters[i].begin());
buf += m_gaul[i];
}
assert(buf - chk == (int)m_npar);
......@@ -90,7 +90,7 @@ void MGFunction::get_nlin_parameters(double *buf) const
{
double *chk = buf;
for (unsigned i = 0; i < m_gaul.size(); ++i) {
copy_n(m_parameters[i].begin() + 1, m_gaul[i] - 1, buf);
std::copy_n(m_parameters[i].begin() + 1, m_gaul[i] - 1, buf);
buf += m_gaul[i] - 1;
}
assert(buf - chk == (int)(m_npar - m_gaul.size()));
......@@ -104,7 +104,7 @@ void MGFunction::set_nlin_parameters(const double *buf)
{
const double *chk = buf;
for(unsigned i = 0; i < m_gaul.size(); ++i) {
copy_n(buf, m_gaul[i] - 1, m_parameters[i].begin() + 1);
std::copy_n(buf, m_gaul[i] - 1, m_parameters[i].begin() + 1);
buf += m_gaul[i] - 1 ;
}
assert(buf - chk == (int)(m_npar - m_gaul.size()));
......
......@@ -229,7 +229,7 @@ static object _bstat(numeric::array arr, object mask, double kappa)
/* py_assert(res.second == dev.back(),
PyExc_RuntimeError, "clipped rRMS calculation does not converge"); */
return make_tuple(mean[1], dev[1], mean.back(), dev.back(), cnt);
return boost::python::make_tuple(mean[1], dev[1], mean.back(), dev.back(), cnt);
}
object bstat(numeric::array arr, object mask, double kappa)
......@@ -264,5 +264,5 @@ object bstat(numeric::array arr, object mask, double kappa)
fail:
py_assert(false,
PyExc_RuntimeError, "bstat dispatch failed: not implemented for this datatype/layout");
return tuple(); // this is fake return-statement to silence the compiler
return boost::python::tuple(); // this is fake return-statement to silence the compiler
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment