diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-12-22 15:50:33 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-12-22 15:50:33 +0100 |
commit | 0e8f71b2bcd8430fa0f1677fa605a6b0fc5daf7b (patch) | |
tree | 7f753eb3a6be453c18464b5e677b67c9d07d214f /storage/oqgraph | |
parent | a5e92c7e6d8a6540a63038e4b982599cec2d077f (diff) | |
download | mariadb-git-0e8f71b2bcd8430fa0f1677fa605a6b0fc5daf7b.tar.gz |
LPBUG#906638 : Fixes to build oqgraph with boost 1.48
- dijkstra_shortest_paths() needs a Graph as first parameter, in case of reverse_graph we now need to use
its m_g member
- use boost::tuples::tie() on all places where tie() was used . Reason -
fix the build with Visual Studio 10 SP1 (which includes std:tr1:tie, thus creating ambiguity)
Diffstat (limited to 'storage/oqgraph')
-rw-r--r-- | storage/oqgraph/graphcore.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/storage/oqgraph/graphcore.cc b/storage/oqgraph/graphcore.cc index 0b856ac253f..ba179989ea3 100644 --- a/storage/oqgraph/graphcore.cc +++ b/storage/oqgraph/graphcore.cc @@ -414,7 +414,7 @@ namespace open_query { if (record_weight && u != v) { typename graph_traits<Graph>::out_edge_iterator ei, ei_end; - for (tie(ei, ei_end)= out_edges(v, g); ei != ei_end; ++ei) + for (boost::tuples::tie(ei, ei_end)= out_edges(v, g); ei != ei_end; ++ei) { if (target(*ei, g) == u) { @@ -479,14 +479,14 @@ namespace open_query if (in_degree(dest, g) >= out_degree(orig, g)) { graph_traits<Graph>::out_edge_iterator ei, ei_end; - tie(ei, ei_end)= out_edges(orig, g); + boost::tuples::tie(ei, ei_end)= out_edges(orig, g); if ((ei= find_if(ei, ei_end, target_equals(dest, g))) != ei_end) return *ei; } else { graph_traits<Graph>::in_edge_iterator ei, ei_end; - tie(ei, ei_end)= in_edges(dest, g); + boost::tuples::tie(ei, ei_end)= in_edges(dest, g); if ((ei= find_if(ei, ei_end, source_equals(orig, g))) != ei_end) return *ei; } @@ -727,7 +727,7 @@ namespace open_query if ((cursor= new (std::nothrow) stack_cursor(share)) && orig) { graph_traits<Graph>::out_edge_iterator ei, ei_end; - for (tie(ei, ei_end)= out_edges(*orig, share->g); ei != ei_end; ++ei) + for (boost::tuples::tie(ei, ei_end)= out_edges(*orig, share->g); ei != ei_end; ++ei) { Vertex v= target(*ei, share->g); static_cast<stack_cursor*>(cursor)-> @@ -741,7 +741,7 @@ namespace open_query dest) { graph_traits<Graph>::in_edge_iterator ei, ei_end; - for (tie(ei, ei_end)= in_edges(*dest, share->g); ei != ei_end; ++ei) + for (boost::tuples::tie(ei, ei_end)= in_edges(*dest, share->g); ei != ei_end; ++ei) { Vertex v= source(*ei, share->g); static_cast<stack_cursor*>(cursor)-> @@ -876,7 +876,7 @@ namespace open_query switch (ALGORITHM & op) { case DIJKSTRAS: - dijkstra_shortest_paths(r, *dest, + dijkstra_shortest_paths(r.m_g, *dest, weight_map( share->weightmap ). @@ -1067,7 +1067,7 @@ int edges_cursor::fetch_row(const row &row_info, row &result) edge_iterator it, end; reference ref; size_t count= position; - for (tie(it, end)= edges(share->g); count && it != end; ++it, --count) + for (boost::tuples::tie(it, end)= edges(share->g); count && it != end; ++it, --count) ; if (it != end) ref= reference(position+1, *it); |