diff --git a/routing/road_graph.cpp b/routing/road_graph.cpp index 0b157fc6c9..c9e1a99ca1 100644 --- a/routing/road_graph.cpp +++ b/routing/road_graph.cpp @@ -1,11 +1,20 @@ #include "road_graph.hpp" +#include "../base/assert.hpp" + #include "../std/sstream.hpp" namespace routing { +RoadPos::RoadPos(uint32_t featureId, bool bForward, size_t pointId) + : m_featureId((featureId << 1) + (bForward ? 1 : 0)), m_pointId(pointId) +{ + ASSERT_LESS(featureId, 1U << 31, ()); + ASSERT_LESS(pointId, 0xFFFFFFFF, ()); +} + string DebugPrint(RoadPos const & r) { ostringstream ss; diff --git a/routing/road_graph.hpp b/routing/road_graph.hpp index 044fcf5136..41738a3524 100644 --- a/routing/road_graph.hpp +++ b/routing/road_graph.hpp @@ -2,7 +2,6 @@ #include "../geometry/point2d.hpp" -#include "../base/assert.hpp" #include "../base/string_utils.hpp" #include "../std/vector.hpp" @@ -16,12 +15,7 @@ class RoadPos { public: RoadPos() : m_featureId(0), m_pointId(0) {} - RoadPos(uint32_t featureId, bool bForward, size_t pointId) - : m_featureId((featureId << 1) + (bForward ? 1 : 0)), m_pointId(pointId) - { - ASSERT_LESS(featureId, 1U << 31, ()); - ASSERT_LESS(pointId, 0xFFFFFFFF, ()); - } + RoadPos(uint32_t featureId, bool bForward, size_t pointId); uint32_t GetFeatureId() const { return m_featureId >> 1; } bool IsForward() const { return (m_featureId & 1) != 0; }