Don't pass shared_ptr down to functions

"Don’t pass a smart pointer as a function parameter unless you want to
use or manipulate the smart pointer itself, such as to share or transfer
ownership."

Source:
http://herbsutter.com/2013/06/05/gotw-91-solution-smart-pointer-parameters/
This commit is contained in:
Patrick Niklaus
2016-03-05 18:17:24 +01:00
parent a8fc95d4e4
commit e7ea5f500d
3 changed files with 297 additions and 341 deletions
+2 -2
View File
@@ -317,8 +317,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
++node_based_edge_counter;
auto turn_candidates =
guidance::getTurns(node_u, edge_from_u, m_node_based_graph, m_node_info_list,
m_restriction_map, m_barrier_nodes, m_compressed_edge_container);
guidance::getTurns(node_u, edge_from_u, *m_node_based_graph, m_node_info_list,
*m_restriction_map, m_barrier_nodes, m_compressed_edge_container);
const NodeID node_v = m_node_based_graph->GetTarget(edge_from_u);