Fix platform-independent data in data files
This commit is contained in:
@@ -78,7 +78,7 @@ class Contractor
|
||||
private:
|
||||
ContractorConfig config;
|
||||
|
||||
std::size_t
|
||||
EdgeID
|
||||
LoadEdgeExpandedGraph(const std::string &edge_based_graph_path,
|
||||
util::DeallocatingVector<extractor::EdgeBasedEdge> &edge_based_edge_list,
|
||||
const std::string &edge_segment_lookup_path,
|
||||
|
||||
@@ -251,9 +251,9 @@ class InternalDataFacade final : public BaseDataFacade
|
||||
}
|
||||
BOOST_ASSERT(datasources_stream);
|
||||
|
||||
std::size_t number_of_datasources = 0;
|
||||
std::uint64_t number_of_datasources = 0;
|
||||
datasources_stream.read(reinterpret_cast<char *>(&number_of_datasources),
|
||||
sizeof(std::size_t));
|
||||
sizeof(number_of_datasources));
|
||||
if (number_of_datasources > 0)
|
||||
{
|
||||
m_datasource_list.resize(number_of_datasources);
|
||||
|
||||
@@ -104,7 +104,7 @@ class EdgeBasedGraphFactory
|
||||
//! list of edge based nodes (compressed segments)
|
||||
std::vector<EdgeBasedNode> m_edge_based_node_list;
|
||||
util::DeallocatingVector<EdgeBasedEdge> m_edge_based_edge_list;
|
||||
unsigned m_max_edge_id;
|
||||
EdgeID m_max_edge_id;
|
||||
|
||||
const std::vector<QueryNode> &m_node_info_list;
|
||||
std::shared_ptr<util::NodeBasedDynamicGraph> m_node_based_graph;
|
||||
|
||||
@@ -54,7 +54,7 @@ class Extractor
|
||||
private:
|
||||
ExtractorConfig config;
|
||||
|
||||
std::pair<std::size_t, std::size_t>
|
||||
std::pair<std::size_t, EdgeID>
|
||||
BuildEdgeExpandedGraph(lua_State *lua_state,
|
||||
const ProfileProperties &profile_properties,
|
||||
std::vector<QueryNode> &internal_to_external_node_map,
|
||||
@@ -79,7 +79,7 @@ class Extractor
|
||||
std::vector<QueryNode> &internal_to_external_node_map);
|
||||
|
||||
void WriteEdgeBasedGraph(const std::string &output_file_filename,
|
||||
const size_t max_edge_id,
|
||||
const EdgeID max_edge_id,
|
||||
util::DeallocatingVector<EdgeBasedEdge> const &edge_based_edge_list);
|
||||
|
||||
void WriteIntersectionClassificationData(
|
||||
|
||||
@@ -24,8 +24,8 @@ template <typename EdgeDataT> class DynamicGraph
|
||||
{
|
||||
public:
|
||||
using EdgeData = EdgeDataT;
|
||||
using NodeIterator = unsigned;
|
||||
using EdgeIterator = unsigned;
|
||||
using NodeIterator = std::uint32_t;
|
||||
using EdgeIterator = std::uint32_t;
|
||||
using EdgeRange = range<EdgeIterator>;
|
||||
|
||||
class InputEdge
|
||||
|
||||
@@ -64,7 +64,7 @@ using NodeBasedDynamicGraph = DynamicGraph<NodeBasedEdgeData>;
|
||||
/// Since DynamicGraph expects directed edges, we need to insert
|
||||
/// two edges for undirected edges.
|
||||
inline std::shared_ptr<NodeBasedDynamicGraph>
|
||||
NodeBasedDynamicGraphFromEdges(std::size_t number_of_nodes,
|
||||
NodeBasedDynamicGraphFromEdges(NodeID number_of_nodes,
|
||||
const std::vector<extractor::NodeBasedEdge> &input_edge_list)
|
||||
{
|
||||
auto edges_list = directedEdgesFromCompressed<NodeBasedDynamicGraph::InputEdge>(
|
||||
@@ -84,8 +84,7 @@ NodeBasedDynamicGraphFromEdges(std::size_t number_of_nodes,
|
||||
|
||||
tbb::parallel_sort(edges_list.begin(), edges_list.end());
|
||||
|
||||
auto graph = std::make_shared<NodeBasedDynamicGraph>(
|
||||
static_cast<NodeBasedDynamicGraph::NodeIterator>(number_of_nodes), edges_list);
|
||||
auto graph = std::make_shared<NodeBasedDynamicGraph>(number_of_nodes, edges_list);
|
||||
|
||||
return graph;
|
||||
}
|
||||
|
||||
@@ -54,10 +54,10 @@ static const OSMWayID MIN_OSM_WAYID = OSMWayID(std::numeric_limits<std::uint32_t
|
||||
using OSMNodeID_weak = std::uint64_t;
|
||||
using OSMEdgeID_weak = std::uint64_t;
|
||||
|
||||
using NodeID = unsigned int;
|
||||
using EdgeID = unsigned int;
|
||||
using NodeID = std::uint32_t;
|
||||
using EdgeID = std::uint32_t;
|
||||
using NameID = std::uint32_t;
|
||||
using EdgeWeight = int;
|
||||
using EdgeWeight = std::int32_t;
|
||||
|
||||
using BearingClassID = std::uint32_t;
|
||||
static const BearingClassID INVALID_BEARING_CLASSID = std::numeric_limits<std::uint32_t>::max();
|
||||
@@ -67,13 +67,13 @@ using DiscreteBearing = std::uint16_t;
|
||||
using EntryClassID = std::uint16_t;
|
||||
static const EntryClassID INVALID_ENTRY_CLASSID = std::numeric_limits<std::uint16_t>::max();
|
||||
|
||||
static const NodeID SPECIAL_NODEID = std::numeric_limits<unsigned>::max();
|
||||
static const NodeID SPECIAL_SEGMENTID = std::numeric_limits<int>::max();
|
||||
static const EdgeID SPECIAL_EDGEID = std::numeric_limits<unsigned>::max();
|
||||
static const unsigned INVALID_NAMEID = std::numeric_limits<unsigned>::max();
|
||||
static const unsigned EMPTY_NAMEID = 0;
|
||||
static const NodeID SPECIAL_NODEID = std::numeric_limits<NodeID>::max();
|
||||
static const NodeID SPECIAL_SEGMENTID = std::numeric_limits<NodeID>::max() >> 1;
|
||||
static const EdgeID SPECIAL_EDGEID = std::numeric_limits<EdgeID>::max();
|
||||
static const NameID INVALID_NAMEID = std::numeric_limits<NameID>::max();
|
||||
static const NameID EMPTY_NAMEID = 0;
|
||||
static const unsigned INVALID_COMPONENTID = 0;
|
||||
static const EdgeWeight INVALID_EDGE_WEIGHT = std::numeric_limits<int>::max();
|
||||
static const EdgeWeight INVALID_EDGE_WEIGHT = std::numeric_limits<EdgeWeight>::max();
|
||||
|
||||
struct SegmentID
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user