Merge pull request #6444 from Project-OSRM/dl_using_keyword
[CPP17] Modernize: Replace typedef with using statements
This commit is contained in:
commit
152a52bc1a
@ -219,7 +219,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Uint64Pair FLATBUFFERS_FINAL_CLASS {
|
||||
FLATBUFFERS_STRUCT_END(Uint64Pair, 16);
|
||||
|
||||
struct WaypointT : public flatbuffers::NativeTable {
|
||||
typedef Waypoint TableType;
|
||||
using TableType = Waypoint;
|
||||
std::string hint;
|
||||
float distance;
|
||||
std::string name;
|
||||
@ -239,7 +239,7 @@ struct WaypointT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Waypoint FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef WaypointT NativeTableType;
|
||||
using NativeTableType = WaypointT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_HINT = 4,
|
||||
VT_DISTANCE = 6,
|
||||
@ -393,14 +393,14 @@ inline flatbuffers::Offset<Waypoint> CreateWaypointDirect(
|
||||
flatbuffers::Offset<Waypoint> CreateWaypoint(flatbuffers::FlatBufferBuilder &_fbb, const WaypointT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct MetadataT : public flatbuffers::NativeTable {
|
||||
typedef Metadata TableType;
|
||||
using TableType = Metadata;
|
||||
std::vector<std::string> datasource_names;
|
||||
MetadataT() {
|
||||
}
|
||||
};
|
||||
|
||||
struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef MetadataT NativeTableType;
|
||||
using NativeTableType = MetadataT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_DATASOURCE_NAMES = 4
|
||||
};
|
||||
@ -457,7 +457,7 @@ inline flatbuffers::Offset<Metadata> CreateMetadataDirect(
|
||||
flatbuffers::Offset<Metadata> CreateMetadata(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct AnnotationT : public flatbuffers::NativeTable {
|
||||
typedef Annotation TableType;
|
||||
using TableType = Annotation;
|
||||
std::vector<uint32_t> distance;
|
||||
std::vector<uint32_t> duration;
|
||||
std::vector<uint32_t> datasources;
|
||||
@ -470,7 +470,7 @@ struct AnnotationT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Annotation FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef AnnotationT NativeTableType;
|
||||
using NativeTableType = AnnotationT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_DISTANCE = 4,
|
||||
VT_DURATION = 6,
|
||||
@ -609,7 +609,7 @@ inline flatbuffers::Offset<Annotation> CreateAnnotationDirect(
|
||||
flatbuffers::Offset<Annotation> CreateAnnotation(flatbuffers::FlatBufferBuilder &_fbb, const AnnotationT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct StepManeuverT : public flatbuffers::NativeTable {
|
||||
typedef StepManeuver TableType;
|
||||
using TableType = StepManeuver;
|
||||
std::unique_ptr<osrm::engine::api::fbresult::Position> location;
|
||||
uint16_t bearing_before;
|
||||
uint16_t bearing_after;
|
||||
@ -626,7 +626,7 @@ struct StepManeuverT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct StepManeuver FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef StepManeuverT NativeTableType;
|
||||
using NativeTableType = StepManeuverT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_LOCATION = 4,
|
||||
VT_BEARING_BEFORE = 6,
|
||||
@ -722,7 +722,7 @@ inline flatbuffers::Offset<StepManeuver> CreateStepManeuver(
|
||||
flatbuffers::Offset<StepManeuver> CreateStepManeuver(flatbuffers::FlatBufferBuilder &_fbb, const StepManeuverT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct LaneT : public flatbuffers::NativeTable {
|
||||
typedef Lane TableType;
|
||||
using TableType = Lane;
|
||||
std::vector<osrm::engine::api::fbresult::Turn> indications;
|
||||
bool valid;
|
||||
LaneT()
|
||||
@ -731,7 +731,7 @@ struct LaneT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Lane FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef LaneT NativeTableType;
|
||||
using NativeTableType = LaneT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_INDICATIONS = 4,
|
||||
VT_VALID = 6
|
||||
@ -799,7 +799,7 @@ inline flatbuffers::Offset<Lane> CreateLaneDirect(
|
||||
flatbuffers::Offset<Lane> CreateLane(flatbuffers::FlatBufferBuilder &_fbb, const LaneT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct IntersectionT : public flatbuffers::NativeTable {
|
||||
typedef Intersection TableType;
|
||||
using TableType = Intersection;
|
||||
std::unique_ptr<osrm::engine::api::fbresult::Position> location;
|
||||
std::vector<int16_t> bearings;
|
||||
std::vector<std::string> classes;
|
||||
@ -814,7 +814,7 @@ struct IntersectionT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Intersection FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef IntersectionT NativeTableType;
|
||||
using NativeTableType = IntersectionT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_LOCATION = 4,
|
||||
VT_BEARINGS = 6,
|
||||
@ -950,7 +950,7 @@ inline flatbuffers::Offset<Intersection> CreateIntersectionDirect(
|
||||
flatbuffers::Offset<Intersection> CreateIntersection(flatbuffers::FlatBufferBuilder &_fbb, const IntersectionT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct StepT : public flatbuffers::NativeTable {
|
||||
typedef Step TableType;
|
||||
using TableType = Step;
|
||||
float distance;
|
||||
float duration;
|
||||
std::string polyline;
|
||||
@ -976,7 +976,7 @@ struct StepT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Step FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef StepT NativeTableType;
|
||||
using NativeTableType = StepT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_DISTANCE = 4,
|
||||
VT_DURATION = 6,
|
||||
@ -1234,7 +1234,7 @@ inline flatbuffers::Offset<Step> CreateStepDirect(
|
||||
flatbuffers::Offset<Step> CreateStep(flatbuffers::FlatBufferBuilder &_fbb, const StepT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct LegT : public flatbuffers::NativeTable {
|
||||
typedef Leg TableType;
|
||||
using TableType = Leg;
|
||||
double distance;
|
||||
double duration;
|
||||
double weight;
|
||||
@ -1249,7 +1249,7 @@ struct LegT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Leg FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef LegT NativeTableType;
|
||||
using NativeTableType = LegT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_DISTANCE = 4,
|
||||
VT_DURATION = 6,
|
||||
@ -1369,7 +1369,7 @@ inline flatbuffers::Offset<Leg> CreateLegDirect(
|
||||
flatbuffers::Offset<Leg> CreateLeg(flatbuffers::FlatBufferBuilder &_fbb, const LegT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct RouteObjectT : public flatbuffers::NativeTable {
|
||||
typedef RouteObject TableType;
|
||||
using TableType = RouteObject;
|
||||
float distance;
|
||||
float duration;
|
||||
float weight;
|
||||
@ -1387,7 +1387,7 @@ struct RouteObjectT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct RouteObject FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef RouteObjectT NativeTableType;
|
||||
using NativeTableType = RouteObjectT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_DISTANCE = 4,
|
||||
VT_DURATION = 6,
|
||||
@ -1534,7 +1534,7 @@ inline flatbuffers::Offset<RouteObject> CreateRouteObjectDirect(
|
||||
flatbuffers::Offset<RouteObject> CreateRouteObject(flatbuffers::FlatBufferBuilder &_fbb, const RouteObjectT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct TableT : public flatbuffers::NativeTable {
|
||||
typedef Table TableType;
|
||||
using TableType = Table;
|
||||
std::vector<float> durations;
|
||||
uint16_t rows;
|
||||
uint16_t cols;
|
||||
@ -1548,7 +1548,7 @@ struct TableT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Table FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef TableT NativeTableType;
|
||||
using NativeTableType = TableT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_DURATIONS = 4,
|
||||
VT_ROWS = 6,
|
||||
@ -1671,7 +1671,7 @@ inline flatbuffers::Offset<Table> CreateTableDirect(
|
||||
flatbuffers::Offset<Table> CreateTable(flatbuffers::FlatBufferBuilder &_fbb, const TableT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct ErrorT : public flatbuffers::NativeTable {
|
||||
typedef Error TableType;
|
||||
using TableType = Error;
|
||||
std::string code;
|
||||
std::string message;
|
||||
ErrorT() {
|
||||
@ -1679,7 +1679,7 @@ struct ErrorT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct Error FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef ErrorT NativeTableType;
|
||||
using NativeTableType = ErrorT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_CODE = 4,
|
||||
VT_MESSAGE = 6
|
||||
@ -1749,7 +1749,7 @@ inline flatbuffers::Offset<Error> CreateErrorDirect(
|
||||
flatbuffers::Offset<Error> CreateError(flatbuffers::FlatBufferBuilder &_fbb, const ErrorT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct FBResultT : public flatbuffers::NativeTable {
|
||||
typedef FBResult TableType;
|
||||
using TableType = FBResult;
|
||||
bool error;
|
||||
std::unique_ptr<osrm::engine::api::fbresult::ErrorT> code;
|
||||
std::string data_version;
|
||||
@ -1762,7 +1762,7 @@ struct FBResultT : public flatbuffers::NativeTable {
|
||||
};
|
||||
|
||||
struct FBResult FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
typedef FBResultT NativeTableType;
|
||||
using NativeTableType = FBResultT;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_ERROR = 4,
|
||||
VT_CODE = 6,
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -34,8 +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
|
||||
SIMPLE_PREVIOUS, // an assignemtnn using the turns specified at the previous road (e.g.
|
||||
@ -50,7 +49,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 +60,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,
|
||||
|
@ -100,15 +100,14 @@ template <storage::Ownership Ownership> class CellStorageImpl
|
||||
{
|
||||
|
||||
using ValueT = decltype(*std::declval<ValuePtrT>());
|
||||
typedef boost::
|
||||
iterator_facade<ColumnIterator<ValueT>, ValueT, boost::random_access_traversal_tag>
|
||||
base_t;
|
||||
using base_t = boost::
|
||||
iterator_facade<ColumnIterator<ValueT>, ValueT, boost::random_access_traversal_tag>;
|
||||
|
||||
public:
|
||||
typedef typename base_t::value_type value_type;
|
||||
typedef typename base_t::difference_type difference_type;
|
||||
typedef typename base_t::reference reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
using value_type = typename base_t::value_type;
|
||||
using difference_type = typename base_t::difference_type;
|
||||
using reference = typename base_t::reference;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
explicit ColumnIterator() : current(nullptr), stride(1) {}
|
||||
|
||||
|
@ -171,8 +171,8 @@ namespace std
|
||||
{
|
||||
template <typename From, typename Tag> struct hash<osrm::Alias<From, Tag>>
|
||||
{
|
||||
typedef osrm::Alias<From, Tag> argument_type;
|
||||
typedef std::size_t result_type;
|
||||
using argument_type = osrm::Alias<From, Tag>;
|
||||
using result_type = std::size_t;
|
||||
result_type operator()(argument_type const &s) const
|
||||
{
|
||||
return std::hash<From>()(static_cast<const From>(s));
|
||||
|
@ -49,17 +49,16 @@ class BitIterator : public boost::iterator_facade<BitIterator<DataT>,
|
||||
boost::forward_traversal_tag,
|
||||
const std::size_t>
|
||||
{
|
||||
typedef boost::iterator_facade<BitIterator<DataT>,
|
||||
const std::size_t,
|
||||
boost::forward_traversal_tag,
|
||||
const std::size_t>
|
||||
base_t;
|
||||
using base_t = boost::iterator_facade<BitIterator<DataT>,
|
||||
const std::size_t,
|
||||
boost::forward_traversal_tag,
|
||||
const std::size_t>;
|
||||
|
||||
public:
|
||||
typedef typename base_t::value_type value_type;
|
||||
typedef typename base_t::difference_type difference_type;
|
||||
typedef typename base_t::reference reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
using value_type = typename base_t::value_type;
|
||||
using difference_type = typename base_t::difference_type;
|
||||
using reference = typename base_t::reference;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
explicit BitIterator() : m_value(0) {}
|
||||
explicit BitIterator(const DataT x) : m_value(std::move(x)) {}
|
||||
|
@ -26,17 +26,16 @@ class filtered_integer_iterator
|
||||
boost::single_pass_traversal_tag,
|
||||
Integer>
|
||||
{
|
||||
typedef boost::iterator_facade<filtered_integer_iterator<Integer, Filter>,
|
||||
Integer,
|
||||
boost::single_pass_traversal_tag,
|
||||
Integer>
|
||||
base_t;
|
||||
using base_t = boost::iterator_facade<filtered_integer_iterator<Integer, Filter>,
|
||||
Integer,
|
||||
boost::single_pass_traversal_tag,
|
||||
Integer>;
|
||||
|
||||
public:
|
||||
typedef typename base_t::value_type value_type;
|
||||
typedef typename base_t::difference_type difference_type;
|
||||
typedef typename base_t::reference reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
using value_type = typename base_t::value_type;
|
||||
using difference_type = typename base_t::difference_type;
|
||||
using reference = typename base_t::reference;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
filtered_integer_iterator() : value(), filter(nullptr) {}
|
||||
explicit filtered_integer_iterator(value_type x, value_type end_value, const Filter *filter)
|
||||
@ -64,8 +63,8 @@ class filtered_integer_iterator
|
||||
template <typename Integer, typename Filter> class filtered_range
|
||||
{
|
||||
public:
|
||||
typedef filtered_integer_iterator<Integer, Filter> const_iterator;
|
||||
typedef filtered_integer_iterator<Integer, Filter> iterator;
|
||||
using const_iterator = filtered_integer_iterator<Integer, Filter>;
|
||||
using iterator = filtered_integer_iterator<Integer, Filter>;
|
||||
|
||||
filtered_range(Integer begin, Integer end, const Filter &filter) : last(end, end, &filter)
|
||||
{
|
||||
|
@ -22,17 +22,16 @@ class integer_iterator : public boost::iterator_facade<integer_iterator<Integer>
|
||||
boost::random_access_traversal_tag,
|
||||
Integer>
|
||||
{
|
||||
typedef boost::iterator_facade<integer_iterator<Integer>,
|
||||
Integer,
|
||||
boost::random_access_traversal_tag,
|
||||
Integer>
|
||||
base_t;
|
||||
using base_t = boost::iterator_facade<integer_iterator<Integer>,
|
||||
Integer,
|
||||
boost::random_access_traversal_tag,
|
||||
Integer>;
|
||||
|
||||
public:
|
||||
typedef typename base_t::value_type value_type;
|
||||
typedef typename base_t::difference_type difference_type;
|
||||
typedef typename base_t::reference reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
using value_type = typename base_t::value_type;
|
||||
using difference_type = typename base_t::difference_type;
|
||||
using reference = typename base_t::reference;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
integer_iterator() : m_value() {}
|
||||
explicit integer_iterator(value_type x) : m_value(x) {}
|
||||
@ -65,8 +64,8 @@ class integer_iterator : public boost::iterator_facade<integer_iterator<Integer>
|
||||
template <typename Integer> class range
|
||||
{
|
||||
public:
|
||||
typedef integer_iterator<Integer> const_iterator;
|
||||
typedef integer_iterator<Integer> iterator;
|
||||
using const_iterator = integer_iterator<Integer>;
|
||||
using iterator = integer_iterator<Integer>;
|
||||
|
||||
range(Integer begin, Integer end) : iter(begin), last(end) {}
|
||||
|
||||
|
@ -73,7 +73,7 @@ class Log
|
||||
return *this;
|
||||
}
|
||||
|
||||
typedef std::ostream &(manip)(std::ostream &);
|
||||
using manip = std::ostream &(std::ostream &);
|
||||
|
||||
inline Log &operator<<(manip &m)
|
||||
{
|
||||
|
@ -336,17 +336,16 @@ template <typename T, std::size_t Bits, storage::Ownership Ownership> class Pack
|
||||
boost::random_access_traversal_tag,
|
||||
ReferenceT>
|
||||
{
|
||||
typedef boost::iterator_facade<iterator_impl<DataT, ContainerT, ReferenceT>,
|
||||
DataT,
|
||||
boost::random_access_traversal_tag,
|
||||
ReferenceT>
|
||||
base_t;
|
||||
using base_t = boost::iterator_facade<iterator_impl<DataT, ContainerT, ReferenceT>,
|
||||
DataT,
|
||||
boost::random_access_traversal_tag,
|
||||
ReferenceT>;
|
||||
|
||||
public:
|
||||
typedef typename base_t::value_type value_type;
|
||||
typedef typename base_t::difference_type difference_type;
|
||||
typedef typename base_t::reference reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
using value_type = typename base_t::value_type;
|
||||
using difference_type = typename base_t::difference_type;
|
||||
using reference = typename base_t::reference;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
explicit iterator_impl()
|
||||
: container(nullptr), index(std::numeric_limits<std::size_t>::max())
|
||||
|
@ -30,17 +30,16 @@ class VectorViewIterator : public boost::iterator_facade<VectorViewIterator<Data
|
||||
boost::random_access_traversal_tag,
|
||||
DataT &>
|
||||
{
|
||||
typedef boost::iterator_facade<VectorViewIterator<DataT>,
|
||||
DataT,
|
||||
boost::random_access_traversal_tag,
|
||||
DataT &>
|
||||
base_t;
|
||||
using base_t = boost::iterator_facade<VectorViewIterator<DataT>,
|
||||
DataT,
|
||||
boost::random_access_traversal_tag,
|
||||
DataT &>;
|
||||
|
||||
public:
|
||||
typedef typename base_t::value_type value_type;
|
||||
typedef typename base_t::difference_type difference_type;
|
||||
typedef typename base_t::reference reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
using value_type = typename base_t::value_type;
|
||||
using difference_type = typename base_t::difference_type;
|
||||
using reference = typename base_t::reference;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
explicit VectorViewIterator() : m_value(nullptr) {}
|
||||
explicit VectorViewIterator(DataT *x) : m_value(x) {}
|
||||
|
@ -83,10 +83,10 @@ using FloatLine = std::vector<FloatPoint>;
|
||||
// We use boost::geometry to clip lines/points that are outside or cross the boundary
|
||||
// of the tile we're rendering. We need these types defined to use boosts clipping
|
||||
// logic
|
||||
typedef boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> point_t;
|
||||
typedef boost::geometry::model::linestring<point_t> linestring_t;
|
||||
typedef boost::geometry::model::box<point_t> box_t;
|
||||
typedef boost::geometry::model::multi_linestring<linestring_t> multi_linestring_t;
|
||||
using point_t = boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>;
|
||||
using linestring_t = boost::geometry::model::linestring<point_t>;
|
||||
using box_t = boost::geometry::model::box<point_t>;
|
||||
using multi_linestring_t = boost::geometry::model::multi_linestring<linestring_t>;
|
||||
const static box_t clip_box(point_t(-util::vector_tile::BUFFER, -util::vector_tile::BUFFER),
|
||||
point_t(util::vector_tile::EXTENT + util::vector_tile::BUFFER,
|
||||
util::vector_tile::EXTENT + util::vector_tile::BUFFER));
|
||||
|
@ -17,8 +17,8 @@ struct TestData
|
||||
EdgeID id;
|
||||
};
|
||||
|
||||
typedef DynamicGraph<TestData> TestDynamicGraph;
|
||||
typedef TestDynamicGraph::InputEdge TestInputEdge;
|
||||
using TestDynamicGraph = DynamicGraph<TestData>;
|
||||
using TestInputEdge = TestDynamicGraph::InputEdge;
|
||||
|
||||
BOOST_AUTO_TEST_CASE(find_test)
|
||||
{
|
||||
|
@ -19,13 +19,12 @@ struct TestData
|
||||
unsigned value;
|
||||
};
|
||||
|
||||
typedef NodeID TestNodeID;
|
||||
typedef int TestKey;
|
||||
typedef int TestWeight;
|
||||
typedef boost::mpl::list<ArrayStorage<TestNodeID, TestKey>,
|
||||
MapStorage<TestNodeID, TestKey>,
|
||||
UnorderedMapStorage<TestNodeID, TestKey>>
|
||||
storage_types;
|
||||
using TestNodeID = NodeID;
|
||||
using TestKey = int;
|
||||
using TestWeight = int;
|
||||
using storage_types = boost::mpl::list<ArrayStorage<TestNodeID, TestKey>,
|
||||
MapStorage<TestNodeID, TestKey>,
|
||||
UnorderedMapStorage<TestNodeID, TestKey>>;
|
||||
|
||||
template <unsigned NUM_ELEM> struct RandomDataFixture
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ using namespace osrm;
|
||||
using namespace osrm::util;
|
||||
|
||||
constexpr unsigned BLOCK_SIZE = 16;
|
||||
typedef RangeTable<BLOCK_SIZE, osrm::storage::Ownership::Container> TestRangeTable;
|
||||
using TestRangeTable = RangeTable<BLOCK_SIZE, osrm::storage::Ownership::Container>;
|
||||
|
||||
void ConstructionTest(const std::vector<unsigned> &lengths, const std::vector<unsigned> &offsets)
|
||||
{
|
||||
|
@ -17,10 +17,10 @@ struct TestData
|
||||
EdgeID id;
|
||||
};
|
||||
|
||||
typedef StaticGraph<TestData> TestStaticGraph;
|
||||
typedef TestStaticGraph::NodeArrayEntry TestNodeArrayEntry;
|
||||
typedef TestStaticGraph::EdgeArrayEntry TestEdgeArrayEntry;
|
||||
typedef static_graph_details::SortableEdgeWithData<TestData> TestInputEdge;
|
||||
using TestStaticGraph = StaticGraph<TestData>;
|
||||
using TestNodeArrayEntry = TestStaticGraph::NodeArrayEntry;
|
||||
using TestEdgeArrayEntry = TestStaticGraph::EdgeArrayEntry;
|
||||
using TestInputEdge = static_graph_details::SortableEdgeWithData<TestData>;
|
||||
|
||||
static_assert(traits::HasDataMember<TestInputEdge>::value, "TestInputEdge needs to have data");
|
||||
|
||||
@ -76,7 +76,7 @@ template <unsigned NUM_NODES, unsigned NUM_EDGES> struct RandomArrayEntryFixture
|
||||
std::vector<unsigned> order;
|
||||
};
|
||||
|
||||
typedef RandomArrayEntryFixture<TEST_NUM_NODES, TEST_NUM_EDGES> TestRandomArrayEntryFixture;
|
||||
using TestRandomArrayEntryFixture = RandomArrayEntryFixture<TEST_NUM_NODES, TEST_NUM_EDGES>;
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(array_test, TestRandomArrayEntryFixture)
|
||||
{
|
||||
|
@ -93,8 +93,8 @@ template <unsigned NUM_NODES, unsigned NUM_EDGES> struct RandomGraphFixture
|
||||
{
|
||||
struct TupleHash
|
||||
{
|
||||
typedef std::pair<unsigned, unsigned> argument_type;
|
||||
typedef std::size_t result_type;
|
||||
using argument_type = std::pair<unsigned int, unsigned int>;
|
||||
using result_type = std::size_t;
|
||||
|
||||
result_type operator()(const argument_type &t) const
|
||||
{
|
||||
@ -174,19 +174,19 @@ struct GraphFixture
|
||||
std::vector<TestData> edges;
|
||||
};
|
||||
|
||||
typedef RandomGraphFixture<TEST_LEAF_NODE_SIZE * 3, TEST_LEAF_NODE_SIZE / 2>
|
||||
TestRandomGraphFixture_LeafHalfFull;
|
||||
typedef RandomGraphFixture<TEST_LEAF_NODE_SIZE * 5, TEST_LEAF_NODE_SIZE>
|
||||
TestRandomGraphFixture_LeafFull;
|
||||
typedef RandomGraphFixture<TEST_LEAF_NODE_SIZE * 10, TEST_LEAF_NODE_SIZE * 2>
|
||||
TestRandomGraphFixture_TwoLeaves;
|
||||
typedef RandomGraphFixture<TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR * 3,
|
||||
TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR>
|
||||
TestRandomGraphFixture_Branch;
|
||||
typedef RandomGraphFixture<TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR * 3,
|
||||
TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR * 2>
|
||||
TestRandomGraphFixture_MultipleLevels;
|
||||
typedef RandomGraphFixture<10, 30> TestRandomGraphFixture_10_30;
|
||||
using TestRandomGraphFixture_LeafHalfFull =
|
||||
RandomGraphFixture<TEST_LEAF_NODE_SIZE * 3, TEST_LEAF_NODE_SIZE / 2>;
|
||||
using TestRandomGraphFixture_LeafFull =
|
||||
RandomGraphFixture<TEST_LEAF_NODE_SIZE * 5, TEST_LEAF_NODE_SIZE>;
|
||||
using TestRandomGraphFixture_TwoLeaves =
|
||||
RandomGraphFixture<TEST_LEAF_NODE_SIZE * 10, TEST_LEAF_NODE_SIZE * 2>;
|
||||
using TestRandomGraphFixture_Branch =
|
||||
RandomGraphFixture<TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR * 3,
|
||||
TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR>;
|
||||
using TestRandomGraphFixture_MultipleLevels =
|
||||
RandomGraphFixture<TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR * 3,
|
||||
TEST_LEAF_NODE_SIZE * TEST_BRANCHING_FACTOR * 2>;
|
||||
using TestRandomGraphFixture_10_30 = RandomGraphFixture<10, 30>;
|
||||
|
||||
template <typename RTreeT>
|
||||
void simple_verify_rtree(RTreeT &rtree,
|
||||
|
Loading…
Reference in New Issue
Block a user