[CPP17] Modernize: Replace typedef with using statements

This commit is contained in:
Dennis Luxen
2022-11-06 13:21:45 +01:00
parent fc12b6c365
commit 8bff55cd85
23 changed files with 99 additions and 130 deletions
+1
View File
@@ -7,6 +7,7 @@
#include <boost/numeric/conversion/cast.hpp>
#include <cstdint>
#include <vector>
namespace osrm
{
+2 -2
View File
@@ -152,8 +152,8 @@ namespace std
template <> struct hash<osrm::extractor::NodeBasedTurn>
{
typedef osrm::extractor::NodeBasedTurn argument_type;
typedef std::size_t result_type;
using argument_type = osrm::extractor::NodeBasedTurn;
using result_type = std::size_t;
result_type operator()(argument_type const &s) const noexcept
{
+1 -1
View File
@@ -20,7 +20,7 @@ namespace extractor
// guidance constants.
namespace RoadPriorityClass
{
typedef std::uint8_t Enum;
using Enum = std::uint8_t;
// Top priority Road
const constexpr Enum MOTORWAY = 0;
const constexpr Enum MOTORWAY_LINK = 1;
+2 -2
View File
@@ -38,7 +38,7 @@ inline auto laneTypeToName(const std::size_t type_id)
return name[type_id];
}
typedef std::uint16_t Mask;
using Mask = std::uint16_t;
const constexpr Mask empty = 0u;
const constexpr Mask none = 1u << 0u;
const constexpr Mask straight = 1u << 1u;
@@ -54,7 +54,7 @@ const constexpr Mask merge_to_right = 1u << 10u;
} // namespace TurnLaneType
typedef std::vector<TurnLaneType::Mask> TurnLaneDescription;
using TurnLaneDescription = std::vector<TurnLaneType::Mask>;
// hash function for TurnLaneDescription
struct TurnLaneDescription_hash