first round of replacing deprecated typedefs with much nicer using statements

This commit is contained in:
Dennis Luxen 2014-08-19 13:01:38 +02:00
parent 7edf2bb2c2
commit 82c2ae5441
37 changed files with 92 additions and 93 deletions

View File

@ -46,7 +46,7 @@ class DouglasPeucker
private: private:
std::vector<int> douglas_peucker_thresholds; std::vector<int> douglas_peucker_thresholds;
typedef std::pair<unsigned, unsigned> GeometryRange; using GeometryRange = std::pair<unsigned, unsigned>;
// Stack to simulate the recursion // Stack to simulate the recursion
std::stack<GeometryRange> recursion_stack; std::stack<GeometryRange> recursion_stack;

View File

@ -48,7 +48,7 @@ class IteratorbasedCRC32
unsigned crc = 0; unsigned crc = 0;
while (iter != end) while (iter != end)
{ {
typedef typename std::iterator_traits<Iterator>::value_type value_type; using value_type = typename std::iterator_traits<Iterator>::value_type;
char *data = (char *)(&(*iter)); char *data = (char *)(&(*iter));
if (use_hardware_implementation) if (use_hardware_implementation)

View File

@ -92,12 +92,12 @@ class TarjanSCC
NodeID parent; NodeID parent;
}; };
typedef DynamicGraph<TarjanEdgeData> TarjanDynamicGraph; using TarjanDynamicGraph = DynamicGraph<TarjanEdgeData>;
typedef TarjanDynamicGraph::InputEdge TarjanEdge; using TarjanEdge = TarjanDynamicGraph::InputEdge;
typedef std::pair<NodeID, NodeID> RestrictionSource; using RestrictionSource = std::pair<NodeID, NodeID>;
typedef std::pair<NodeID, bool> RestrictionTarget; using RestrictionTarget = std::pair<NodeID, bool>;
typedef std::vector<RestrictionTarget> EmanatingRestrictionsVector; using EmanatingRestrictionsVector = std::vector<RestrictionTarget>;
typedef std::unordered_map<RestrictionSource, unsigned> RestrictionMap; using RestrictionMap = std::unordered_map<RestrictionSource, unsigned>;
std::vector<NodeInfo> m_coordinate_list; std::vector<NodeInfo> m_coordinate_list;
std::vector<EmanatingRestrictionsVector> m_restriction_bucket_list; std::vector<EmanatingRestrictionsVector> m_restriction_bucket_list;

View File

@ -16,9 +16,9 @@ constexpr int32_t WORLD_MAX_LAT = 90*COORDINATE_PRECISION;
constexpr int32_t WORLD_MIN_LON = -180*COORDINATE_PRECISION; constexpr int32_t WORLD_MIN_LON = -180*COORDINATE_PRECISION;
constexpr int32_t WORLD_MAX_LON = 180*COORDINATE_PRECISION; constexpr int32_t WORLD_MAX_LON = 180*COORDINATE_PRECISION;
typedef EdgeBasedNode RTreeLeaf; using RTreeLeaf = EdgeBasedNode;
typedef std::shared_ptr<std::vector<FixedPointCoordinate>> FixedPointCoordinateListPtr; using FixedPointCoordinateListPtr = std::shared_ptr<std::vector<FixedPointCoordinate>>;
typedef StaticRTree<RTreeLeaf, ShM<FixedPointCoordinate, false>::vector, false> BenchStaticRTree; using BenchStaticRTree = StaticRTree<RTreeLeaf, ShM<FixedPointCoordinate, false>::vector, false>;
FixedPointCoordinateListPtr LoadCoordinates(const boost::filesystem::path& nodes_file) FixedPointCoordinateListPtr LoadCoordinates(const boost::filesystem::path& nodes_file)
{ {

View File

@ -92,12 +92,11 @@ class Contractor
ContractorHeapData(short h, bool t) : hop(h), target(t) {} ContractorHeapData(short h, bool t) : hop(h), target(t) {}
}; };
typedef DynamicGraph<ContractorEdgeData> ContractorGraph; using ContractorGraph = DynamicGraph<ContractorEdgeData>;
// typedef BinaryHeap< NodeID, NodeID, int, ContractorHeapData, ArrayStorage<NodeID, NodeID> // using ContractorHeap = BinaryHeap<NodeID, NodeID, int, ContractorHeapData, ArrayStorage<NodeID, NodeID>
// > ContractorHeap; // >;
typedef BinaryHeap<NodeID, NodeID, int, ContractorHeapData, XORFastHashStorage<NodeID, NodeID>> using ContractorHeap = BinaryHeap<NodeID, NodeID, int, ContractorHeapData, XORFastHashStorage<NodeID, NodeID>>;
ContractorHeap; using ContractorEdge = ContractorGraph::InputEdge;
typedef ContractorGraph::InputEdge ContractorEdge;
struct ContractorThreadData struct ContractorThreadData
{ {
@ -151,7 +150,7 @@ class Contractor
} }
int number_of_nodes; int number_of_nodes;
typedef tbb::enumerable_thread_specific<std::shared_ptr<ContractorThreadData>> EnumerableThreadData; using EnumerableThreadData = tbb::enumerable_thread_specific<std::shared_ptr<ContractorThreadData>>;
EnumerableThreadData data; EnumerableThreadData data;
}; };

View File

@ -93,7 +93,7 @@ class EdgeBasedGraphFactory
} speed_profile; } speed_profile;
private: private:
typedef NodeBasedDynamicGraph::EdgeData EdgeData; using EdgeData = NodeBasedDynamicGraph::EdgeData;
unsigned m_number_of_edge_based_nodes; unsigned m_number_of_edge_based_nodes;

View File

@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class GeometryCompressor class GeometryCompressor
{ {
public: public:
typedef std::pair<NodeID, EdgeWeight> CompressedNode; using CompressedNode = std::pair<NodeID, EdgeWeight>;
GeometryCompressor(); GeometryCompressor();
void CompressEdge(const EdgeID surviving_edge_id, void CompressEdge(const EdgeID surviving_edge_id,

View File

@ -18,9 +18,9 @@
class Prepare class Prepare
{ {
public: public:
typedef QueryEdge::EdgeData EdgeData; using EdgeData = QueryEdge::EdgeData;
typedef DynamicGraph<EdgeData>::InputEdge InputEdge; using InputEdge = DynamicGraph<EdgeData>::InputEdge;
typedef StaticGraph<EdgeData>::InputEdge StaticEdge; using StaticEdge = StaticGraph<EdgeData>::InputEdge;
explicit Prepare(); explicit Prepare();
Prepare(const Prepare &) = delete; Prepare(const Prepare &) = delete;

View File

@ -100,8 +100,8 @@ class BinaryHeap
void operator=(const BinaryHeap &right); void operator=(const BinaryHeap &right);
public: public:
typedef Weight WeightType; using WeightType = Weight;
typedef Data DataType; using DataType = Data;
explicit BinaryHeap(size_t maxID) : node_index(maxID) { Clear(); } explicit BinaryHeap(size_t maxID) : node_index(maxID) { Clear(); }

View File

@ -165,11 +165,11 @@ class DeallocatingVector
std::vector<ElementT *> bucket_list; std::vector<ElementT *> bucket_list;
public: public:
typedef DeallocatingVectorIterator<ElementT, ELEMENTS_PER_BLOCK> iterator; using iterator = DeallocatingVectorIterator<ElementT, ELEMENTS_PER_BLOCK>;
typedef DeallocatingVectorIterator<ElementT, ELEMENTS_PER_BLOCK> const_iterator; using const_iterator = DeallocatingVectorIterator<ElementT, ELEMENTS_PER_BLOCK>;
// this forward-only iterator deallocates all buckets that have been visited // this forward-only iterator deallocates all buckets that have been visited
typedef DeallocatingVectorRemoveIterator<ElementT, ELEMENTS_PER_BLOCK> deallocation_iterator; using deallocation_iterator = DeallocatingVectorRemoveIterator<ElementT, ELEMENTS_PER_BLOCK>;
DeallocatingVector() : current_size(0) { bucket_list.emplace_back(new ElementT[ELEMENTS_PER_BLOCK]); } DeallocatingVector() : current_size(0) { bucket_list.emplace_back(new ElementT[ELEMENTS_PER_BLOCK]); }

View File

@ -43,10 +43,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
template <typename EdgeDataT> class DynamicGraph template <typename EdgeDataT> class DynamicGraph
{ {
public: public:
typedef EdgeDataT EdgeData; using EdgeData = EdgeDataT;
typedef unsigned NodeIterator; using NodeIterator = unsigned;
typedef unsigned EdgeIterator; using EdgeIterator = unsigned;
typedef osrm::range<EdgeIterator> EdgeRange; using EdgeRange = osrm::range<EdgeIterator>;
class InputEdge class InputEdge
{ {

View File

@ -34,7 +34,7 @@ template <typename Key, typename Value>
class HashTable class HashTable
{ {
private: private:
typedef std::pair<Key, Value> KeyValPair; using KeyValPair = std::pair<Key, Value>;
std::vector<KeyValPair> table; std::vector<KeyValPair> table;
public: public:

View File

@ -87,6 +87,6 @@ struct EdgeBasedEdge
bool backward : 1; bool backward : 1;
}; };
typedef NodeBasedEdge ImportEdge; using ImportEdge = NodeBasedEdge;
#endif /* IMPORT_EDGE_H */ #endif /* IMPORT_EDGE_H */

View File

@ -71,13 +71,13 @@ struct Null
{ {
}; };
typedef mapbox::util::variant<String, using Value = mapbox::util::variant<String,
Number, Number,
mapbox::util::recursive_wrapper<Object>, mapbox::util::recursive_wrapper<Object>,
mapbox::util::recursive_wrapper<Array>, mapbox::util::recursive_wrapper<Array>,
True, True,
False, False,
Null > Value; Null>;
struct Object struct Object
{ {

View File

@ -52,8 +52,8 @@ struct SimpleEdgeData
EdgeWeight capacity; EdgeWeight capacity;
}; };
typedef DynamicGraph<NodeBasedEdgeData> NodeBasedDynamicGraph; using NodeBasedDynamicGraph = DynamicGraph<NodeBasedEdgeData>;
typedef DynamicGraph<SimpleEdgeData> SimpleNodeBasedDynamicGraph; using SimpleNodeBasedDynamicGraph = DynamicGraph<SimpleEdgeData>;
// Factory method to create NodeBasedDynamicGraph from ImportEdges // Factory method to create NodeBasedDynamicGraph from ImportEdges
inline std::shared_ptr<NodeBasedDynamicGraph> inline std::shared_ptr<NodeBasedDynamicGraph>

View File

@ -134,7 +134,7 @@ struct PhantomNode
} }
}; };
typedef std::vector<std::vector<PhantomNode>> PhantomNodeArray; using PhantomNodeArray = std::vector<std::vector<PhantomNode>>;
struct PhantomNodeLists struct PhantomNodeLists
{ {

View File

@ -38,8 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct NodeInfo struct NodeInfo
{ {
typedef NodeID key_type; // type of NodeID using key_type = NodeID; // type of NodeID
typedef int value_type; // type of lat,lons using value_type = int; // type of lat,lons
explicit NodeInfo(int lat, int lon, NodeID node_id) : lat(lat), lon(lon), node_id(node_id) {} explicit NodeInfo(int lat, int lon, NodeID node_id) : lat(lat), lon(lon), node_id(node_id) {}
NodeInfo() NodeInfo()

View File

@ -36,10 +36,10 @@ class RangeTable
{ {
public: public:
typedef std::array<unsigned char, BLOCK_SIZE> BlockT; using BlockT = std::array<unsigned char, BLOCK_SIZE>;
typedef typename ShM<BlockT, USE_SHARED_MEMORY>::vector BlockContainerT; using BlockContainerT = typename ShM<BlockT, USE_SHARED_MEMORY>::vector;
typedef typename ShM<unsigned, USE_SHARED_MEMORY>::vector OffsetContainerT; using OffsetContainerT = typename ShM<unsigned, USE_SHARED_MEMORY>::vector;
typedef osrm::range<unsigned> RangeT; using RangeT = osrm::range<unsigned>;
friend std::ostream& operator<< <>(std::ostream &out, const RangeTable &table); friend std::ostream& operator<< <>(std::ostream &out, const RangeTable &table);
friend std::istream& operator>> <>(std::istream &in, RangeTable &table); friend std::istream& operator>> <>(std::istream &in, RangeTable &table);

View File

@ -101,7 +101,7 @@ struct InputRestrictionContainer
struct CmpRestrictionContainerByFrom struct CmpRestrictionContainerByFrom
{ {
typedef InputRestrictionContainer value_type; using value_type = InputRestrictionContainer;
inline bool operator()(const InputRestrictionContainer &a, const InputRestrictionContainer &b) inline bool operator()(const InputRestrictionContainer &a, const InputRestrictionContainer &b)
const const
{ {
@ -113,7 +113,7 @@ struct CmpRestrictionContainerByFrom
struct CmpRestrictionContainerByTo struct CmpRestrictionContainerByTo
{ {
typedef InputRestrictionContainer value_type; using value_type = InputRestrictionContainer;
inline bool operator()(const InputRestrictionContainer &a, const InputRestrictionContainer &b) inline bool operator()(const InputRestrictionContainer &a, const InputRestrictionContainer &b)
const const
{ {

View File

@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __RESTRICTION_MAP_H__ #ifndef RESTRICTION_MAP_H__
#define __RESTRICTION_MAP_H__ #define RESTRICTION_MAP_H__
#include <memory> #include <memory>
@ -110,8 +110,8 @@ class RestrictionMap
private: private:
bool IsSourceNode(const NodeID node) const; bool IsSourceNode(const NodeID node) const;
typedef std::vector<RestrictionTarget> EmanatingRestrictionsVector; using EmanatingRestrictionsVector = std::vector<RestrictionTarget>;
typedef NodeBasedDynamicGraph::EdgeData EdgeData; using EdgeData = NodeBasedDynamicGraph::EdgeData;
std::size_t m_count; std::size_t m_count;
std::shared_ptr<NodeBasedDynamicGraph> m_graph; std::shared_ptr<NodeBasedDynamicGraph> m_graph;

View File

@ -41,8 +41,8 @@ struct HeapData
struct SearchEngineData struct SearchEngineData
{ {
typedef BinaryHeap<NodeID, NodeID, int, HeapData, UnorderedMapStorage<NodeID, int>> QueryHeap; using QueryHeap = BinaryHeap<NodeID, NodeID, int, HeapData, UnorderedMapStorage<NodeID, int>>;
typedef boost::thread_specific_ptr<QueryHeap> SearchEngineHeapPtr; using SearchEngineHeapPtr = boost::thread_specific_ptr<QueryHeap>;
static SearchEngineHeapPtr forwardHeap; static SearchEngineHeapPtr forwardHeap;
static SearchEngineHeapPtr backwardHeap; static SearchEngineHeapPtr backwardHeap;

View File

@ -365,6 +365,6 @@ template <class LockFileT = OSRMLockFile> class SharedMemoryFactory_tmpl
SharedMemoryFactory_tmpl(const SharedMemoryFactory_tmpl &) = delete; SharedMemoryFactory_tmpl(const SharedMemoryFactory_tmpl &) = delete;
}; };
typedef SharedMemoryFactory_tmpl<> SharedMemoryFactory; using SharedMemoryFactory = SharedMemoryFactory_tmpl<>;
#endif /* SHARED_MEMORY_POINTER_FACTORY_H */ #endif /* SHARED_MEMORY_POINTER_FACTORY_H */

View File

@ -148,9 +148,9 @@ template <> class SharedMemoryWrapper<bool>
template <typename DataT, bool UseSharedMemory> struct ShM template <typename DataT, bool UseSharedMemory> struct ShM
{ {
typedef typename std::conditional<UseSharedMemory, using vector = typename std::conditional<UseSharedMemory,
SharedMemoryWrapper<DataT>, SharedMemoryWrapper<DataT>,
std::vector<DataT>>::type vector; std::vector<DataT>>::type;
}; };
#endif // SHARED_MEMORY_VECTOR_WRAPPER_H #endif // SHARED_MEMORY_VECTOR_WRAPPER_H

View File

@ -46,10 +46,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
template <typename EdgeDataT, bool UseSharedMemory = false> class StaticGraph template <typename EdgeDataT, bool UseSharedMemory = false> class StaticGraph
{ {
public: public:
typedef NodeID NodeIterator; using NodeIterator = NodeID;
typedef NodeID EdgeIterator; using EdgeIterator = NodeID;
typedef EdgeDataT EdgeData; using EdgeData = EdgeDataT;
typedef osrm::range<EdgeIterator> EdgeRange; using EdgeRange = osrm::range<EdgeIterator>;
class InputEdge class InputEdge
{ {

View File

@ -211,7 +211,7 @@ class StaticKDTree
} }
private: private:
typedef unsigned Iterator; using Iterator = unsigned;
struct Tree struct Tree
{ {
Iterator left; Iterator left;

View File

@ -254,7 +254,7 @@ class StaticRTree
} }
}; };
typedef RectangleInt2D RectangleT; using RectangleT = RectangleInt2D;
struct TreeNode struct TreeNode
{ {
@ -307,7 +307,7 @@ class StaticRTree
} }
}; };
typedef mapbox::util::variant<TreeNode, EdgeDataT> IncrementalQueryNodeType; using IncrementalQueryNodeType = mapbox::util::variant<TreeNode, EdgeDataT>;
struct IncrementalQueryCandidate struct IncrementalQueryCandidate
{ {
explicit IncrementalQueryCandidate(const float dist, const IncrementalQueryNodeType &node) explicit IncrementalQueryCandidate(const float dist, const IncrementalQueryNodeType &node)

View File

@ -43,12 +43,12 @@ class ExtractionContainers
const static unsigned stxxl_memory = ((sizeof(std::size_t) == 4) ? INT_MAX : UINT_MAX); const static unsigned stxxl_memory = ((sizeof(std::size_t) == 4) ? INT_MAX : UINT_MAX);
#endif #endif
public: public:
typedef stxxl::vector<NodeID> STXXLNodeIDVector; using STXXLNodeIDVector = stxxl::vector<NodeID>;
typedef stxxl::vector<ExternalMemoryNode> STXXLNodeVector; using STXXLNodeVector = stxxl::vector<ExternalMemoryNode>;
typedef stxxl::vector<InternalExtractorEdge> STXXLEdgeVector; using STXXLEdgeVector = stxxl::vector<InternalExtractorEdge>;
typedef stxxl::vector<std::string> STXXLStringVector; using STXXLStringVector = stxxl::vector<std::string>;
typedef stxxl::vector<InputRestrictionContainer> STXXLRestrictionsVector; using STXXLRestrictionsVector = stxxl::vector<InputRestrictionContainer>;
typedef stxxl::vector<WayIDStartAndEndEdge> STXXLWayIDStartEndVector; using STXXLWayIDStartEndVector = stxxl::vector<WayIDStartAndEndEdge>;
STXXLNodeIDVector used_node_id_list; STXXLNodeIDVector used_node_id_list;
STXXLNodeVector all_nodes_list; STXXLNodeVector all_nodes_list;

View File

@ -83,7 +83,7 @@ struct WayIDStartAndEndEdge
struct CmpWayByID struct CmpWayByID
{ {
typedef WayIDStartAndEndEdge value_type; using value_type = WayIDStartAndEndEdge;
bool operator()(const WayIDStartAndEndEdge &a, const WayIDStartAndEndEdge &b) const bool operator()(const WayIDStartAndEndEdge &a, const WayIDStartAndEndEdge &b) const
{ {
return a.wayID < b.wayID; return a.wayID < b.wayID;
@ -94,7 +94,7 @@ struct CmpWayByID
struct Cmp struct Cmp
{ {
typedef NodeID value_type; using value_type = NodeID;
bool operator()(const NodeID left, const NodeID right) const { return left < right; } bool operator()(const NodeID left, const NodeID right) const { return left < right; }
value_type max_value() { return 0xffffffff; } value_type max_value() { return 0xffffffff; }
value_type min_value() { return 0x0; } value_type min_value() { return 0x0; }
@ -102,7 +102,7 @@ struct Cmp
struct CmpNodeByID struct CmpNodeByID
{ {
typedef ExternalMemoryNode value_type; using value_type = ExternalMemoryNode;
bool operator()(const ExternalMemoryNode &left, const ExternalMemoryNode &right) const bool operator()(const ExternalMemoryNode &left, const ExternalMemoryNode &right) const
{ {
return left.node_id < right.node_id; return left.node_id < right.node_id;

View File

@ -92,7 +92,7 @@ struct InternalExtractorEdge
struct CmpEdgeByStartID struct CmpEdgeByStartID
{ {
typedef InternalExtractorEdge value_type; using value_type = InternalExtractorEdge;
bool operator()(const InternalExtractorEdge &a, const InternalExtractorEdge &b) const bool operator()(const InternalExtractorEdge &a, const InternalExtractorEdge &b) const
{ {
return a.start < b.start; return a.start < b.start;
@ -105,7 +105,7 @@ struct CmpEdgeByStartID
struct CmpEdgeByTargetID struct CmpEdgeByTargetID
{ {
typedef InternalExtractorEdge value_type; using value_type = InternalExtractorEdge;
bool operator()(const InternalExtractorEdge &a, const InternalExtractorEdge &b) const bool operator()(const InternalExtractorEdge &a, const InternalExtractorEdge &b) const
{ {

View File

@ -45,7 +45,7 @@ template <class EdgeDataT> class BaseDataFacade;
class OSRM_impl class OSRM_impl
{ {
private: private:
typedef std::unordered_map<std::string, BasePlugin *> PluginMap; using PluginMap = std::unordered_map<std::string, BasePlugin *>;
public: public:
OSRM_impl(const ServerPaths &paths, const bool use_shared_memory); OSRM_impl(const ServerPaths &paths, const bool use_shared_memory);

View File

@ -45,10 +45,10 @@ const double VIAPATH_GAMMA = 0.75; // alternative shares at most 75% with the
template <class DataFacadeT> class AlternativeRouting : private BasicRoutingInterface<DataFacadeT> template <class DataFacadeT> class AlternativeRouting : private BasicRoutingInterface<DataFacadeT>
{ {
typedef BasicRoutingInterface<DataFacadeT> super; using super = BasicRoutingInterface<DataFacadeT>;
typedef typename DataFacadeT::EdgeData EdgeData; using EdgeData = typename DataFacadeT::EdgeData;
typedef SearchEngineData::QueryHeap QueryHeap; using QueryHeap = SearchEngineData::QueryHeap;
typedef std::pair<NodeID, NodeID> SearchSpaceEdge; using SearchSpaceEdge = std::pair<NodeID, NodeID>;
struct RankedCandidateNode struct RankedCandidateNode
{ {

View File

@ -41,8 +41,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
template <class DataFacadeT> class ManyToManyRouting : public BasicRoutingInterface<DataFacadeT> template <class DataFacadeT> class ManyToManyRouting : public BasicRoutingInterface<DataFacadeT>
{ {
typedef BasicRoutingInterface<DataFacadeT> super; using super = BasicRoutingInterface<DataFacadeT>;
typedef SearchEngineData::QueryHeap QueryHeap; using QueryHeap = SearchEngineData::QueryHeap;
SearchEngineData &engine_working_data; SearchEngineData &engine_working_data;
struct NodeBucket struct NodeBucket
@ -54,7 +54,7 @@ template <class DataFacadeT> class ManyToManyRouting : public BasicRoutingInterf
{ {
} }
}; };
typedef std::unordered_map<NodeID, std::vector<NodeBucket>> SearchSpaceWithBuckets; using SearchSpaceWithBuckets = std::unordered_map<NodeID, std::vector<NodeBucket>>;
public: public:
ManyToManyRouting(DataFacadeT *facade, SearchEngineData &engine_working_data) ManyToManyRouting(DataFacadeT *facade, SearchEngineData &engine_working_data)

View File

@ -37,8 +37,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
template <class DataFacadeT> class ShortestPathRouting : public BasicRoutingInterface<DataFacadeT> template <class DataFacadeT> class ShortestPathRouting : public BasicRoutingInterface<DataFacadeT>
{ {
typedef BasicRoutingInterface<DataFacadeT> super; using super = BasicRoutingInterface<DataFacadeT>;
typedef SearchEngineData::QueryHeap QueryHeap; using QueryHeap = SearchEngineData::QueryHeap;
SearchEngineData &engine_working_data; SearchEngineData &engine_working_data;
public: public:

View File

@ -44,7 +44,7 @@ class RequestHandler
{ {
public: public:
typedef APIGrammar<std::string::iterator, RouteParameters> APIGrammarParser; using APIGrammarParser = APIGrammar<std::string::iterator, RouteParameters>;
RequestHandler(); RequestHandler();
RequestHandler(const RequestHandler &) = delete; RequestHandler(const RequestHandler &) = delete;

View File

@ -38,8 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory> #include <memory>
#include <vector> #include <vector>
typedef QueryEdge::EdgeData EdgeData; using EdgeData = QueryEdge::EdgeData;
typedef StaticGraph<EdgeData> QueryGraph; using QueryGraph = StaticGraph<EdgeData>;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

View File

@ -44,9 +44,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <osrm/Coordinate.h> #include <osrm/Coordinate.h>
typedef BaseDataFacade<QueryEdge::EdgeData>::RTreeLeaf RTreeLeaf; using RTreeLeaf = BaseDataFacade<QueryEdge::EdgeData>::RTreeLeaf;
typedef StaticRTree<RTreeLeaf, ShM<FixedPointCoordinate, true>::vector, true>::TreeNode RTreeNode; using RTreeNode = StaticRTree<RTreeLeaf, ShM<FixedPointCoordinate, true>::vector, true>::TreeNode;
typedef StaticGraph<QueryEdge::EdgeData> QueryGraph; using QueryGraph = StaticGraph<QueryEdge::EdgeData>;
#ifdef __linux__ #ifdef __linux__
#include <sys/mman.h> #include <sys/mman.h>

View File

@ -37,9 +37,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif #endif
#endif #endif
typedef unsigned int NodeID; using NodeID = unsigned int;
typedef unsigned int EdgeID; using EdgeID = unsigned int;
typedef int EdgeWeight; using EdgeWeight = int;
static const NodeID SPECIAL_NODEID = std::numeric_limits<unsigned>::max(); static const NodeID SPECIAL_NODEID = std::numeric_limits<unsigned>::max();
static const EdgeID SPECIAL_EDGEID = std::numeric_limits<unsigned>::max(); static const EdgeID SPECIAL_EDGEID = std::numeric_limits<unsigned>::max();