Commit c3a5066b authored by Tiago Peixoto's avatar Tiago Peixoto

Fix compilation problem with GCC 9

This fixes issue #580.
parent c353b76e
Pipeline #490 failed with stage
in 403 minutes and 26 seconds
......@@ -555,7 +555,7 @@ void GraphInterface::write_to_file(string file, boost::python::object pfile,
dynamic_property_map* pmap =
any_cast<dynamic_property_map*>
(boost::python::extract<boost::any>
(props[i][1].attr("get_dynamic_map")()));
(props[i][1].attr("get_dynamic_map")())());
dp.insert(boost::python::extract<string>(props[i][0]),
DP_SMART_PTR<dynamic_property_map>(pmap));
}
......
......@@ -277,9 +277,9 @@ public:
_beta[n] = python::extract<double>(params["beta"][n]);
if (hasattr(params["h"], "_get_any"))
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"].attr("_get_any")())).get_unchecked();
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"].attr("_get_any")())()).get_unchecked();
else
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"][n].attr("_get_any")())).get_unchecked();
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"][n].attr("_get_any")())()).get_unchecked();
}
double log_P(size_t v, size_t n, double m, double s)
......
......@@ -617,7 +617,7 @@ public:
if (active != python::object())
{
for (int i = 0; i < python::len(active); ++i)
_active.push_back(boost::any_cast<amap_t>(python::extract<boost::any>(active[i].attr("_get_any")())).get_unchecked());
_active.push_back(boost::any_cast<amap_t>(python::extract<boost::any>(active[i].attr("_get_any")())()).get_unchecked());
}
}
else
......@@ -631,7 +631,7 @@ public:
_has_r_v = false;
if (params["r_v"] != python::object())
{
_r_v = boost::any_cast<hmap_t>(python::extract<boost::any>(params["r_v"].attr("_get_any")())).get_unchecked();
_r_v = boost::any_cast<hmap_t>(python::extract<boost::any>(params["r_v"].attr("_get_any")())()).get_unchecked();
_has_r_v = true;
}
}
......@@ -744,9 +744,9 @@ public:
_beta[n] = python::extract<double>(params["beta"][n]);
if (hasattr(params["h"], "_get_any"))
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"].attr("_get_any")())).get_unchecked();
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"].attr("_get_any")())()).get_unchecked();
else
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"][n].attr("_get_any")())).get_unchecked();
_h[n] = boost::any_cast<hmap_t>(python::extract<boost::any>(params["h"][n].attr("_get_any")())()).get_unchecked();
}
double log_P(size_t v, size_t n, double m, int s)
......
......@@ -52,7 +52,7 @@ void sfdp_layout(GraphInterface& g, boost::any pos, boost::any vweight,
double mu = python::extract<double>(spring_parms[4]);
double mu_p = python::extract<double>(spring_parms[5]);
group_map_t groups =
any_cast<group_map_t>(python::extract<any>(spring_parms[6]));
any_cast<group_map_t>(python::extract<any>(spring_parms[6])());
if(vweight.empty())
vweight = vweight_map_t();
......
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