Switched to std::shared_ptr in Contractor/
This commit is contained in:
@@ -4,9 +4,6 @@
|
||||
#include "DynamicGraph.h"
|
||||
#include "ImportEdge.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
struct NodeBasedEdgeData {
|
||||
NodeBasedEdgeData() : distance(INVALID_EDGE_WEIGHT), edgeBasedNodeID(SPECIAL_NODEID), nameID(std::numeric_limits<unsigned>::max()),
|
||||
type(std::numeric_limits<short>::max()), isAccessRestricted(false), shortcut(false), forward(false), backward(false),
|
||||
@@ -43,7 +40,7 @@ struct NodeBasedEdgeData {
|
||||
typedef DynamicGraph<NodeBasedEdgeData> NodeBasedDynamicGraph;
|
||||
|
||||
// Factory method to create NodeBasedDynamicGraph from ImportEdges
|
||||
inline boost::shared_ptr<NodeBasedDynamicGraph> NodeBasedDynamicGraphFromImportEdges(
|
||||
inline std::shared_ptr<NodeBasedDynamicGraph> NodeBasedDynamicGraphFromImportEdges(
|
||||
int number_of_nodes,
|
||||
std::vector<ImportEdge>& input_edge_list
|
||||
) {
|
||||
@@ -92,7 +89,7 @@ inline boost::shared_ptr<NodeBasedDynamicGraph> NodeBasedDynamicGraphFromImportE
|
||||
}
|
||||
|
||||
std::sort( edges_list.begin(), edges_list.end() );
|
||||
auto graph = boost::make_shared<NodeBasedDynamicGraph>(
|
||||
auto graph = std::make_shared<NodeBasedDynamicGraph>(
|
||||
number_of_nodes,
|
||||
edges_list
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "RestrictionMap.h"
|
||||
#include "NodeBasedGraph.h"
|
||||
|
||||
RestrictionMap::RestrictionMap(const boost::shared_ptr<NodeBasedDynamicGraph>& graph, const std::vector<TurnRestriction> & input_restrictions_list)
|
||||
RestrictionMap::RestrictionMap(const std::shared_ptr<NodeBasedDynamicGraph>& graph, const std::vector<TurnRestriction> & input_restrictions_list)
|
||||
: m_count(0)
|
||||
, m_graph(graph)
|
||||
{
|
||||
|
||||
@@ -28,6 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef __RESTRICTION_MAP_H__
|
||||
#define __RESTRICTION_MAP_H__
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "../typedefs.h"
|
||||
#include "DynamicGraph.h"
|
||||
#include "Restriction.h"
|
||||
@@ -42,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
class RestrictionMap
|
||||
{
|
||||
public:
|
||||
RestrictionMap(const boost::shared_ptr<NodeBasedDynamicGraph>& graph,
|
||||
RestrictionMap(const std::shared_ptr<NodeBasedDynamicGraph>& graph,
|
||||
const std::vector<TurnRestriction> & input_restrictions_list);
|
||||
|
||||
void FixupArrivingTurnRestriction(const NodeID u, const NodeID v, const NodeID w);
|
||||
@@ -59,7 +61,7 @@ private:
|
||||
typedef NodeBasedDynamicGraph::EdgeData EdgeData;
|
||||
|
||||
unsigned m_count;
|
||||
boost::shared_ptr<NodeBasedDynamicGraph> m_graph;
|
||||
std::shared_ptr<NodeBasedDynamicGraph> m_graph;
|
||||
//! index -> list of (target, isOnly)
|
||||
std::vector<EmanatingRestrictionsVector> m_restriction_bucket_list;
|
||||
//! maps (start, via) -> bucket index
|
||||
|
||||
Reference in New Issue
Block a user