[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
+2 -2
View File
@@ -16,7 +16,7 @@ namespace guidance
// direction modifiers based on angle
namespace DirectionModifier
{
typedef std::uint8_t Enum;
using Enum = std::uint8_t;
const constexpr Enum UTurn = 0;
const constexpr Enum SharpRight = 1;
const constexpr Enum Right = 2;
@@ -30,7 +30,7 @@ const constexpr Enum MaxDirectionModifier = 8;
namespace TurnType
{
typedef std::uint8_t Enum;
using Enum = std::uint8_t;
const constexpr Enum Invalid = 0; // no valid turn instruction
const constexpr Enum NewName = 1; // no turn, but name changes
const constexpr Enum Continue = 2; // remain on a street
+1 -1
View File
@@ -24,7 +24,7 @@ struct TurnLaneData
// one-to-one mapping.
bool operator<(const TurnLaneData &other) const;
};
typedef std::vector<TurnLaneData> LaneDataVector;
using LaneDataVector = std::vector<TurnLaneData>;
// convertes a string given in the OSM format into a TurnLaneData vector
OSRM_ATTR_WARN_UNUSED
+3 -3
View File
@@ -34,7 +34,7 @@ namespace lanes
namespace
{
typedef enum TurnLaneScenario
using TurnLaneScenario = enum TurnLaneScenario
{
SIMPLE, // a straightforward assignment
PARTITION_LOCAL, // an assignment that requires partitioning, using local turns
@@ -50,7 +50,7 @@ typedef enum TurnLaneScenario
INVALID, // some error might have occurred
UNKNOWN, // UNKNOWN describes all cases that we are currently not able to handle
NUM_SCENARIOS
} TurnLaneScenario;
};
} // namespace
@@ -61,7 +61,7 @@ class TurnLaneHandler
using ScopedWriterLock = boost::interprocess::scoped_lock<UpgradableMutex>;
public:
typedef std::vector<TurnLaneData> LaneDataVector;
using LaneDataVector = std::vector<TurnLaneData>;
TurnLaneHandler(const util::NodeBasedDynamicGraph &node_based_graph,
const extractor::EdgeBasedNodeDataContainer &node_data_container,