diff --git a/Algorithms/DouglasPeucker.h b/Algorithms/DouglasPeucker.h index d0f295cc6ae..60fc377b101 100644 --- a/Algorithms/DouglasPeucker.h +++ b/Algorithms/DouglasPeucker.h @@ -46,7 +46,7 @@ class DouglasPeucker private: std::vector douglas_peucker_thresholds; - typedef std::pair GeometryRange; + using GeometryRange = std::pair; // Stack to simulate the recursion std::stack recursion_stack; diff --git a/Algorithms/IteratorBasedCRC32.h b/Algorithms/IteratorBasedCRC32.h index 3ada50e11f3..e0d7284c144 100644 --- a/Algorithms/IteratorBasedCRC32.h +++ b/Algorithms/IteratorBasedCRC32.h @@ -48,7 +48,7 @@ class IteratorbasedCRC32 unsigned crc = 0; while (iter != end) { - typedef typename std::iterator_traits::value_type value_type; + using value_type = typename std::iterator_traits::value_type; char *data = (char *)(&(*iter)); if (use_hardware_implementation) diff --git a/Algorithms/StronglyConnectedComponents.h b/Algorithms/StronglyConnectedComponents.h index bc9ba0406bf..d349f0ebe1b 100644 --- a/Algorithms/StronglyConnectedComponents.h +++ b/Algorithms/StronglyConnectedComponents.h @@ -92,12 +92,12 @@ class TarjanSCC NodeID parent; }; - typedef DynamicGraph TarjanDynamicGraph; - typedef TarjanDynamicGraph::InputEdge TarjanEdge; - typedef std::pair RestrictionSource; - typedef std::pair RestrictionTarget; - typedef std::vector EmanatingRestrictionsVector; - typedef std::unordered_map RestrictionMap; + using TarjanDynamicGraph = DynamicGraph; + using TarjanEdge = TarjanDynamicGraph::InputEdge; + using RestrictionSource = std::pair; + using RestrictionTarget = std::pair; + using EmanatingRestrictionsVector = std::vector; + using RestrictionMap = std::unordered_map; std::vector m_coordinate_list; std::vector m_restriction_bucket_list; diff --git a/Benchmarks/StaticRTreeBench.cpp b/Benchmarks/StaticRTreeBench.cpp index a7c9a5c2e52..a59b560b093 100644 --- a/Benchmarks/StaticRTreeBench.cpp +++ b/Benchmarks/StaticRTreeBench.cpp @@ -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_MAX_LON = 180*COORDINATE_PRECISION; -typedef EdgeBasedNode RTreeLeaf; -typedef std::shared_ptr> FixedPointCoordinateListPtr; -typedef StaticRTree::vector, false> BenchStaticRTree; +using RTreeLeaf = EdgeBasedNode; +using FixedPointCoordinateListPtr = std::shared_ptr>; +using BenchStaticRTree = StaticRTree::vector, false>; FixedPointCoordinateListPtr LoadCoordinates(const boost::filesystem::path& nodes_file) { diff --git a/Contractor/Contractor.h b/Contractor/Contractor.h index 514d9649f3f..132b3eab3c0 100644 --- a/Contractor/Contractor.h +++ b/Contractor/Contractor.h @@ -92,12 +92,11 @@ class Contractor ContractorHeapData(short h, bool t) : hop(h), target(t) {} }; - typedef DynamicGraph ContractorGraph; - // typedef BinaryHeap< NodeID, NodeID, int, ContractorHeapData, ArrayStorage - // > ContractorHeap; - typedef BinaryHeap> - ContractorHeap; - typedef ContractorGraph::InputEdge ContractorEdge; + using ContractorGraph = DynamicGraph; + // using ContractorHeap = BinaryHeap + // >; + using ContractorHeap = BinaryHeap>; + using ContractorEdge = ContractorGraph::InputEdge; struct ContractorThreadData { @@ -151,7 +150,7 @@ class Contractor } int number_of_nodes; - typedef tbb::enumerable_thread_specific> EnumerableThreadData; + using EnumerableThreadData = tbb::enumerable_thread_specific>; EnumerableThreadData data; }; diff --git a/Contractor/EdgeBasedGraphFactory.h b/Contractor/EdgeBasedGraphFactory.h index 4605fc1c37f..be35a199c4f 100644 --- a/Contractor/EdgeBasedGraphFactory.h +++ b/Contractor/EdgeBasedGraphFactory.h @@ -93,7 +93,7 @@ class EdgeBasedGraphFactory } speed_profile; private: - typedef NodeBasedDynamicGraph::EdgeData EdgeData; + using EdgeData = NodeBasedDynamicGraph::EdgeData; unsigned m_number_of_edge_based_nodes; diff --git a/Contractor/GeometryCompressor.h b/Contractor/GeometryCompressor.h index 7c4fba45cd3..cd83b2afa67 100644 --- a/Contractor/GeometryCompressor.h +++ b/Contractor/GeometryCompressor.h @@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. class GeometryCompressor { public: - typedef std::pair CompressedNode; + using CompressedNode = std::pair; GeometryCompressor(); void CompressEdge(const EdgeID surviving_edge_id, diff --git a/Contractor/Prepare.h b/Contractor/Prepare.h index 5503fcb20bd..cd8cbcadd70 100644 --- a/Contractor/Prepare.h +++ b/Contractor/Prepare.h @@ -18,9 +18,9 @@ class Prepare { public: - typedef QueryEdge::EdgeData EdgeData; - typedef DynamicGraph::InputEdge InputEdge; - typedef StaticGraph::InputEdge StaticEdge; + using EdgeData = QueryEdge::EdgeData; + using InputEdge = DynamicGraph::InputEdge; + using StaticEdge = StaticGraph::InputEdge; explicit Prepare(); Prepare(const Prepare &) = delete; diff --git a/DataStructures/BinaryHeap.h b/DataStructures/BinaryHeap.h index 6903be1b3fc..24a65cbf08e 100644 --- a/DataStructures/BinaryHeap.h +++ b/DataStructures/BinaryHeap.h @@ -100,8 +100,8 @@ class BinaryHeap void operator=(const BinaryHeap &right); public: - typedef Weight WeightType; - typedef Data DataType; + using WeightType = Weight; + using DataType = Data; explicit BinaryHeap(size_t maxID) : node_index(maxID) { Clear(); } diff --git a/DataStructures/DeallocatingVector.h b/DataStructures/DeallocatingVector.h index 3aec167d665..422dd5f19d9 100644 --- a/DataStructures/DeallocatingVector.h +++ b/DataStructures/DeallocatingVector.h @@ -165,11 +165,11 @@ class DeallocatingVector std::vector bucket_list; public: - typedef DeallocatingVectorIterator iterator; - typedef DeallocatingVectorIterator const_iterator; + using iterator = DeallocatingVectorIterator; + using const_iterator = DeallocatingVectorIterator; // this forward-only iterator deallocates all buckets that have been visited - typedef DeallocatingVectorRemoveIterator deallocation_iterator; + using deallocation_iterator = DeallocatingVectorRemoveIterator; DeallocatingVector() : current_size(0) { bucket_list.emplace_back(new ElementT[ELEMENTS_PER_BLOCK]); } diff --git a/DataStructures/DynamicGraph.h b/DataStructures/DynamicGraph.h index 4fc345df049..bc0c8e0cdaf 100644 --- a/DataStructures/DynamicGraph.h +++ b/DataStructures/DynamicGraph.h @@ -43,10 +43,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. template class DynamicGraph { public: - typedef EdgeDataT EdgeData; - typedef unsigned NodeIterator; - typedef unsigned EdgeIterator; - typedef osrm::range EdgeRange; + using EdgeData = EdgeDataT; + using NodeIterator = unsigned; + using EdgeIterator = unsigned; + using EdgeRange = osrm::range; class InputEdge { diff --git a/DataStructures/HashTable.h b/DataStructures/HashTable.h index 199c6df86cb..8ff4688363d 100644 --- a/DataStructures/HashTable.h +++ b/DataStructures/HashTable.h @@ -34,7 +34,7 @@ template class HashTable { private: - typedef std::pair KeyValPair; + using KeyValPair = std::pair; std::vector table; public: diff --git a/DataStructures/ImportEdge.h b/DataStructures/ImportEdge.h index f79a484f879..ecaffc97c0b 100644 --- a/DataStructures/ImportEdge.h +++ b/DataStructures/ImportEdge.h @@ -87,6 +87,6 @@ struct EdgeBasedEdge bool backward : 1; }; -typedef NodeBasedEdge ImportEdge; +using ImportEdge = NodeBasedEdge; #endif /* IMPORT_EDGE_H */ diff --git a/DataStructures/JSONContainer.h b/DataStructures/JSONContainer.h index 7476b4eae3b..e2fcde088bc 100644 --- a/DataStructures/JSONContainer.h +++ b/DataStructures/JSONContainer.h @@ -71,13 +71,13 @@ struct Null { }; -typedef mapbox::util::variant, mapbox::util::recursive_wrapper, True, False, - Null > Value; + Null>; struct Object { diff --git a/DataStructures/NodeBasedGraph.h b/DataStructures/NodeBasedGraph.h index 103d3906325..580c71d865c 100644 --- a/DataStructures/NodeBasedGraph.h +++ b/DataStructures/NodeBasedGraph.h @@ -52,8 +52,8 @@ struct SimpleEdgeData EdgeWeight capacity; }; -typedef DynamicGraph NodeBasedDynamicGraph; -typedef DynamicGraph SimpleNodeBasedDynamicGraph; +using NodeBasedDynamicGraph = DynamicGraph; +using SimpleNodeBasedDynamicGraph = DynamicGraph; // Factory method to create NodeBasedDynamicGraph from ImportEdges inline std::shared_ptr diff --git a/DataStructures/PhantomNodes.h b/DataStructures/PhantomNodes.h index 2a2a92405c3..c46b1457346 100644 --- a/DataStructures/PhantomNodes.h +++ b/DataStructures/PhantomNodes.h @@ -134,7 +134,7 @@ struct PhantomNode } }; -typedef std::vector> PhantomNodeArray; +using PhantomNodeArray = std::vector>; struct PhantomNodeLists { diff --git a/DataStructures/QueryNode.h b/DataStructures/QueryNode.h index ee6b278606e..6ebbce46d7e 100644 --- a/DataStructures/QueryNode.h +++ b/DataStructures/QueryNode.h @@ -38,8 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. struct NodeInfo { - typedef NodeID key_type; // type of NodeID - typedef int value_type; // type of lat,lons + using key_type = NodeID; // type of NodeID + 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) {} NodeInfo() diff --git a/DataStructures/RangeTable.h b/DataStructures/RangeTable.h index 3ac498df218..0023fdba476 100644 --- a/DataStructures/RangeTable.h +++ b/DataStructures/RangeTable.h @@ -36,10 +36,10 @@ class RangeTable { public: - typedef std::array BlockT; - typedef typename ShM::vector BlockContainerT; - typedef typename ShM::vector OffsetContainerT; - typedef osrm::range RangeT; + using BlockT = std::array; + using BlockContainerT = typename ShM::vector; + using OffsetContainerT = typename ShM::vector; + using RangeT = osrm::range; friend std::ostream& operator<< <>(std::ostream &out, const RangeTable &table); friend std::istream& operator>> <>(std::istream &in, RangeTable &table); diff --git a/DataStructures/Restriction.h b/DataStructures/Restriction.h index 2b166f51523..bda0f01961d 100644 --- a/DataStructures/Restriction.h +++ b/DataStructures/Restriction.h @@ -101,7 +101,7 @@ struct InputRestrictionContainer struct CmpRestrictionContainerByFrom { - typedef InputRestrictionContainer value_type; + using value_type = InputRestrictionContainer; inline bool operator()(const InputRestrictionContainer &a, const InputRestrictionContainer &b) const { @@ -113,7 +113,7 @@ struct CmpRestrictionContainerByFrom struct CmpRestrictionContainerByTo { - typedef InputRestrictionContainer value_type; + using value_type = InputRestrictionContainer; inline bool operator()(const InputRestrictionContainer &a, const InputRestrictionContainer &b) const { diff --git a/DataStructures/RestrictionMap.h b/DataStructures/RestrictionMap.h index 580d5e3487a..ee9ada81b09 100644 --- a/DataStructures/RestrictionMap.h +++ b/DataStructures/RestrictionMap.h @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __RESTRICTION_MAP_H__ -#define __RESTRICTION_MAP_H__ +#ifndef RESTRICTION_MAP_H__ +#define RESTRICTION_MAP_H__ #include @@ -110,8 +110,8 @@ class RestrictionMap private: bool IsSourceNode(const NodeID node) const; - typedef std::vector EmanatingRestrictionsVector; - typedef NodeBasedDynamicGraph::EdgeData EdgeData; + using EmanatingRestrictionsVector = std::vector; + using EdgeData = NodeBasedDynamicGraph::EdgeData; std::size_t m_count; std::shared_ptr m_graph; diff --git a/DataStructures/SearchEngineData.h b/DataStructures/SearchEngineData.h index f0621e67774..d5bfb53f929 100644 --- a/DataStructures/SearchEngineData.h +++ b/DataStructures/SearchEngineData.h @@ -41,8 +41,8 @@ struct HeapData struct SearchEngineData { - typedef BinaryHeap> QueryHeap; - typedef boost::thread_specific_ptr SearchEngineHeapPtr; + using QueryHeap = BinaryHeap>; + using SearchEngineHeapPtr = boost::thread_specific_ptr; static SearchEngineHeapPtr forwardHeap; static SearchEngineHeapPtr backwardHeap; diff --git a/DataStructures/SharedMemoryFactory.h b/DataStructures/SharedMemoryFactory.h index a07e1253316..4ed9c9bae2e 100644 --- a/DataStructures/SharedMemoryFactory.h +++ b/DataStructures/SharedMemoryFactory.h @@ -365,6 +365,6 @@ template class SharedMemoryFactory_tmpl SharedMemoryFactory_tmpl(const SharedMemoryFactory_tmpl &) = delete; }; -typedef SharedMemoryFactory_tmpl<> SharedMemoryFactory; +using SharedMemoryFactory = SharedMemoryFactory_tmpl<>; #endif /* SHARED_MEMORY_POINTER_FACTORY_H */ diff --git a/DataStructures/SharedMemoryVectorWrapper.h b/DataStructures/SharedMemoryVectorWrapper.h index fe4baf33856..5b943543fb4 100644 --- a/DataStructures/SharedMemoryVectorWrapper.h +++ b/DataStructures/SharedMemoryVectorWrapper.h @@ -148,9 +148,9 @@ template <> class SharedMemoryWrapper template struct ShM { - typedef typename std::conditional, - std::vector>::type vector; + std::vector>::type; }; #endif // SHARED_MEMORY_VECTOR_WRAPPER_H diff --git a/DataStructures/StaticGraph.h b/DataStructures/StaticGraph.h index 91d50979329..4649e984fd4 100644 --- a/DataStructures/StaticGraph.h +++ b/DataStructures/StaticGraph.h @@ -46,10 +46,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. template class StaticGraph { public: - typedef NodeID NodeIterator; - typedef NodeID EdgeIterator; - typedef EdgeDataT EdgeData; - typedef osrm::range EdgeRange; + using NodeIterator = NodeID; + using EdgeIterator = NodeID; + using EdgeData = EdgeDataT; + using EdgeRange = osrm::range; class InputEdge { diff --git a/DataStructures/StaticKDTree.h b/DataStructures/StaticKDTree.h index e36eee97a7e..4e93884472d 100644 --- a/DataStructures/StaticKDTree.h +++ b/DataStructures/StaticKDTree.h @@ -211,7 +211,7 @@ class StaticKDTree } private: - typedef unsigned Iterator; + using Iterator = unsigned; struct Tree { Iterator left; diff --git a/DataStructures/StaticRTree.h b/DataStructures/StaticRTree.h index a5814b050a0..b17f61428f0 100644 --- a/DataStructures/StaticRTree.h +++ b/DataStructures/StaticRTree.h @@ -254,7 +254,7 @@ class StaticRTree } }; - typedef RectangleInt2D RectangleT; + using RectangleT = RectangleInt2D; struct TreeNode { @@ -307,7 +307,7 @@ class StaticRTree } }; - typedef mapbox::util::variant IncrementalQueryNodeType; + using IncrementalQueryNodeType = mapbox::util::variant; struct IncrementalQueryCandidate { explicit IncrementalQueryCandidate(const float dist, const IncrementalQueryNodeType &node) diff --git a/Extractor/ExtractionContainers.h b/Extractor/ExtractionContainers.h index f1308fd7cbd..bfb318ba7a9 100644 --- a/Extractor/ExtractionContainers.h +++ b/Extractor/ExtractionContainers.h @@ -43,12 +43,12 @@ class ExtractionContainers const static unsigned stxxl_memory = ((sizeof(std::size_t) == 4) ? INT_MAX : UINT_MAX); #endif public: - typedef stxxl::vector STXXLNodeIDVector; - typedef stxxl::vector STXXLNodeVector; - typedef stxxl::vector STXXLEdgeVector; - typedef stxxl::vector STXXLStringVector; - typedef stxxl::vector STXXLRestrictionsVector; - typedef stxxl::vector STXXLWayIDStartEndVector; + using STXXLNodeIDVector = stxxl::vector; + using STXXLNodeVector = stxxl::vector; + using STXXLEdgeVector = stxxl::vector; + using STXXLStringVector = stxxl::vector; + using STXXLRestrictionsVector = stxxl::vector; + using STXXLWayIDStartEndVector = stxxl::vector; STXXLNodeIDVector used_node_id_list; STXXLNodeVector all_nodes_list; diff --git a/Extractor/ExtractorStructs.h b/Extractor/ExtractorStructs.h index 51a74c3be57..a3c6f3eaf51 100644 --- a/Extractor/ExtractorStructs.h +++ b/Extractor/ExtractorStructs.h @@ -83,7 +83,7 @@ struct WayIDStartAndEndEdge struct CmpWayByID { - typedef WayIDStartAndEndEdge value_type; + using value_type = WayIDStartAndEndEdge; bool operator()(const WayIDStartAndEndEdge &a, const WayIDStartAndEndEdge &b) const { return a.wayID < b.wayID; @@ -94,7 +94,7 @@ struct CmpWayByID struct Cmp { - typedef NodeID value_type; + using value_type = NodeID; bool operator()(const NodeID left, const NodeID right) const { return left < right; } value_type max_value() { return 0xffffffff; } value_type min_value() { return 0x0; } @@ -102,7 +102,7 @@ struct Cmp struct CmpNodeByID { - typedef ExternalMemoryNode value_type; + using value_type = ExternalMemoryNode; bool operator()(const ExternalMemoryNode &left, const ExternalMemoryNode &right) const { return left.node_id < right.node_id; diff --git a/Extractor/InternalExtractorEdge.h b/Extractor/InternalExtractorEdge.h index 02903e8a334..852f9f92943 100644 --- a/Extractor/InternalExtractorEdge.h +++ b/Extractor/InternalExtractorEdge.h @@ -92,7 +92,7 @@ struct InternalExtractorEdge struct CmpEdgeByStartID { - typedef InternalExtractorEdge value_type; + using value_type = InternalExtractorEdge; bool operator()(const InternalExtractorEdge &a, const InternalExtractorEdge &b) const { return a.start < b.start; @@ -105,7 +105,7 @@ struct CmpEdgeByStartID struct CmpEdgeByTargetID { - typedef InternalExtractorEdge value_type; + using value_type = InternalExtractorEdge; bool operator()(const InternalExtractorEdge &a, const InternalExtractorEdge &b) const { diff --git a/Library/OSRM_impl.h b/Library/OSRM_impl.h index 8ad98bbda58..e518036e9dc 100644 --- a/Library/OSRM_impl.h +++ b/Library/OSRM_impl.h @@ -45,7 +45,7 @@ template class BaseDataFacade; class OSRM_impl { private: - typedef std::unordered_map PluginMap; + using PluginMap = std::unordered_map; public: OSRM_impl(const ServerPaths &paths, const bool use_shared_memory); diff --git a/RoutingAlgorithms/AlternativePathRouting.h b/RoutingAlgorithms/AlternativePathRouting.h index 897def587cd..c29d9c411d4 100644 --- a/RoutingAlgorithms/AlternativePathRouting.h +++ b/RoutingAlgorithms/AlternativePathRouting.h @@ -45,10 +45,10 @@ const double VIAPATH_GAMMA = 0.75; // alternative shares at most 75% with the template class AlternativeRouting : private BasicRoutingInterface { - typedef BasicRoutingInterface super; - typedef typename DataFacadeT::EdgeData EdgeData; - typedef SearchEngineData::QueryHeap QueryHeap; - typedef std::pair SearchSpaceEdge; + using super = BasicRoutingInterface; + using EdgeData = typename DataFacadeT::EdgeData; + using QueryHeap = SearchEngineData::QueryHeap; + using SearchSpaceEdge = std::pair; struct RankedCandidateNode { diff --git a/RoutingAlgorithms/ManyToManyRouting.h b/RoutingAlgorithms/ManyToManyRouting.h index 7819c676d6f..332409a8187 100644 --- a/RoutingAlgorithms/ManyToManyRouting.h +++ b/RoutingAlgorithms/ManyToManyRouting.h @@ -41,8 +41,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. template class ManyToManyRouting : public BasicRoutingInterface { - typedef BasicRoutingInterface super; - typedef SearchEngineData::QueryHeap QueryHeap; + using super = BasicRoutingInterface; + using QueryHeap = SearchEngineData::QueryHeap; SearchEngineData &engine_working_data; struct NodeBucket @@ -54,7 +54,7 @@ template class ManyToManyRouting : public BasicRoutingInterf { } }; - typedef std::unordered_map> SearchSpaceWithBuckets; + using SearchSpaceWithBuckets = std::unordered_map>; public: ManyToManyRouting(DataFacadeT *facade, SearchEngineData &engine_working_data) diff --git a/RoutingAlgorithms/ShortestPathRouting.h b/RoutingAlgorithms/ShortestPathRouting.h index 997cc644ef8..deac8bb309c 100644 --- a/RoutingAlgorithms/ShortestPathRouting.h +++ b/RoutingAlgorithms/ShortestPathRouting.h @@ -37,8 +37,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. template class ShortestPathRouting : public BasicRoutingInterface { - typedef BasicRoutingInterface super; - typedef SearchEngineData::QueryHeap QueryHeap; + using super = BasicRoutingInterface; + using QueryHeap = SearchEngineData::QueryHeap; SearchEngineData &engine_working_data; public: diff --git a/Server/RequestHandler.h b/Server/RequestHandler.h index 462c34ffc29..7263dad4efe 100644 --- a/Server/RequestHandler.h +++ b/Server/RequestHandler.h @@ -44,7 +44,7 @@ class RequestHandler { public: - typedef APIGrammar APIGrammarParser; + using APIGrammarParser = APIGrammar; RequestHandler(); RequestHandler(const RequestHandler &) = delete; diff --git a/Tools/check-hsgr.cpp b/Tools/check-hsgr.cpp index c8dc9c64e16..4730afe61b9 100644 --- a/Tools/check-hsgr.cpp +++ b/Tools/check-hsgr.cpp @@ -38,8 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -typedef QueryEdge::EdgeData EdgeData; -typedef StaticGraph QueryGraph; +using EdgeData = QueryEdge::EdgeData; +using QueryGraph = StaticGraph; int main(int argc, char *argv[]) { diff --git a/datastore.cpp b/datastore.cpp index 34c4e0477ed..9df11ce000d 100644 --- a/datastore.cpp +++ b/datastore.cpp @@ -44,9 +44,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -typedef BaseDataFacade::RTreeLeaf RTreeLeaf; -typedef StaticRTree::vector, true>::TreeNode RTreeNode; -typedef StaticGraph QueryGraph; +using RTreeLeaf = BaseDataFacade::RTreeLeaf; +using RTreeNode = StaticRTree::vector, true>::TreeNode; +using QueryGraph = StaticGraph; #ifdef __linux__ #include diff --git a/typedefs.h b/typedefs.h index 3243ac62292..e45a6e8c909 100644 --- a/typedefs.h +++ b/typedefs.h @@ -37,9 +37,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #endif -typedef unsigned int NodeID; -typedef unsigned int EdgeID; -typedef int EdgeWeight; +using NodeID = unsigned int; +using EdgeID = unsigned int; +using EdgeWeight = int; static const NodeID SPECIAL_NODEID = std::numeric_limits::max(); static const EdgeID SPECIAL_EDGEID = std::numeric_limits::max();