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, ...@@ -555,7 +555,7 @@ void GraphInterface::write_to_file(string file, boost::python::object pfile,
dynamic_property_map* pmap = dynamic_property_map* pmap =
any_cast<dynamic_property_map*> any_cast<dynamic_property_map*>
(boost::python::extract<boost::any> (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.insert(boost::python::extract<string>(props[i][0]),
DP_SMART_PTR<dynamic_property_map>(pmap)); DP_SMART_PTR<dynamic_property_map>(pmap));
} }
......
...@@ -277,9 +277,9 @@ public: ...@@ -277,9 +277,9 @@ public:
_beta[n] = python::extract<double>(params["beta"][n]); _beta[n] = python::extract<double>(params["beta"][n]);
if (hasattr(params["h"], "_get_any")) 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 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) double log_P(size_t v, size_t n, double m, double s)
......
...@@ -617,7 +617,7 @@ public: ...@@ -617,7 +617,7 @@ public:
if (active != python::object()) if (active != python::object())
{ {
for (int i = 0; i < python::len(active); ++i) 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 else
...@@ -631,7 +631,7 @@ public: ...@@ -631,7 +631,7 @@ public:
_has_r_v = false; _has_r_v = false;
if (params["r_v"] != python::object()) 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; _has_r_v = true;
} }
} }
...@@ -744,9 +744,9 @@ public: ...@@ -744,9 +744,9 @@ public:
_beta[n] = python::extract<double>(params["beta"][n]); _beta[n] = python::extract<double>(params["beta"][n]);
if (hasattr(params["h"], "_get_any")) 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 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) 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, ...@@ -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 = python::extract<double>(spring_parms[4]);
double mu_p = python::extract<double>(spring_parms[5]); double mu_p = python::extract<double>(spring_parms[5]);
group_map_t groups = 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()) if(vweight.empty())
vweight = vweight_map_t(); 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