replace old-style typefs with using

This commit is contained in:
Dennis Luxen
2015-03-23 17:06:10 +01:00
parent 5565662d87
commit 8ee82d1e03
7 changed files with 243 additions and 26 deletions
+9 -9
View File
@@ -43,13 +43,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
typedef osrm::range<EdgeID> EdgeRange;
using EdgeRange = osrm::range<EdgeID>;
template <class EdgeDataT> class BaseDataFacade
{
public:
typedef EdgeBasedNode RTreeLeaf;
typedef EdgeDataT EdgeData;
using RTreeLeaf = EdgeBasedNode;
using EdgeData = EdgeDataT;
BaseDataFacade() {}
virtual ~BaseDataFacade() {}
@@ -104,12 +104,12 @@ template <class EdgeDataT> class BaseDataFacade
virtual bool
IncrementalFindPhantomNodeForCoordinate(const FixedPointCoordinate &input_coordinate,
PhantomNode &resulting_phantom_node) = 0;
virtual bool
IncrementalFindPhantomNodeForCoordinateWithMaxDistance(const FixedPointCoordinate &input_coordinate,
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
const double max_distance,
const unsigned min_number_of_phantom_nodes,
const unsigned max_number_of_phantom_nodes) = 0;
virtual bool IncrementalFindPhantomNodeForCoordinateWithMaxDistance(
const FixedPointCoordinate &input_coordinate,
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
const double max_distance,
const unsigned min_number_of_phantom_nodes,
const unsigned max_number_of_phantom_nodes) = 0;
virtual unsigned GetCheckSum() const = 0;
@@ -52,10 +52,10 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
{
private:
typedef BaseDataFacade<EdgeDataT> super;
typedef StaticGraph<typename super::EdgeData> QueryGraph;
typedef typename QueryGraph::InputEdge InputEdge;
typedef typename super::RTreeLeaf RTreeLeaf;
using super = BaseDataFacade<EdgeDataT>;
using QueryGraph = StaticGraph<typename super::EdgeData>;
using InputEdge = typename QueryGraph::InputEdge;
using RTreeLeaf = typename super::RTreeLeaf;
InternalDataFacade() {}
+8 -8
View File
@@ -48,14 +48,14 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
{
private:
typedef EdgeDataT EdgeData;
typedef BaseDataFacade<EdgeData> super;
typedef StaticGraph<EdgeData, true> QueryGraph;
typedef typename StaticGraph<EdgeData, true>::NodeArrayEntry GraphNode;
typedef typename StaticGraph<EdgeData, true>::EdgeArrayEntry GraphEdge;
typedef typename RangeTable<16, true>::BlockT NameIndexBlock;
typedef typename QueryGraph::InputEdge InputEdge;
typedef typename super::RTreeLeaf RTreeLeaf;
using EdgeData = EdgeDataT;
using super = BaseDataFacade<EdgeData>;
using QueryGraph = StaticGraph<EdgeData, true>;
using GraphNode = typename StaticGraph<EdgeData, true>::NodeArrayEntry;
using GraphEdge = typename StaticGraph<EdgeData, true>::EdgeArrayEntry;
using NameIndexBlock = typename RangeTable<16, true>::BlockT;
using InputEdge = typename QueryGraph::InputEdge;
using RTreeLeaf = typename super::RTreeLeaf;
using SharedRTree = StaticRTree<RTreeLeaf, ShM<FixedPointCoordinate, true>::vector, true>;
using TimeStampedRTreePair = std::pair<unsigned, std::shared_ptr<SharedRTree>>;
using RTreeNode = typename SharedRTree::TreeNode;