rebase fixes

This commit is contained in:
Lev Dragunov 2015-05-13 11:57:39 +03:00 committed by Alex Zolotarev
parent c7f9940d19
commit 67cc39cb05
2 changed files with 6 additions and 4 deletions

View file

@ -69,7 +69,9 @@ IRouter::ResultCode RoadGraphRouter::CalculateRoute(m2::PointD const & startPoin
// and probably reset the graph. So the checks stay here.
vector<RoadPos> finalVicinity;
string mwmName = m_countryFileFn(finalPoint);
size_t mwmID = m_pIndex->GetMwmIdByName(mwmName + DATA_FILE_EXTENSION);
MwmSet::MwmId mwmID = m_pIndex->GetMwmIdByName(mwmName + DATA_FILE_EXTENSION);
if (!mwmID.IsAlive())
return EndPointNotFound;
if (!IsMyMWM(mwmID))
m_roadGraph.reset(new FeaturesRoadGraph(m_pIndex, mwmID));

View file

@ -34,7 +34,7 @@ UNIT_TEST(StarterPosAtBorder)
UNIT_TEST(MiddleEdgeTest)
{
RoadPos pos1(0, false /* forward */, 0, m2::PointD(3, 0));
RoadPos pos1(0, false /* backward */, 0, m2::PointD(3, 0));
RoadPos pos2(0, true /* forward */, 0, m2::PointD(3, 0));
vector<RoadPos> expected = {pos1, pos2};
TestNearestMock(m2::PointD(3, 3), 2, expected);
@ -42,9 +42,9 @@ UNIT_TEST(MiddleEdgeTest)
UNIT_TEST(MiddleSegmentTest)
{
RoadPos pos1(0, false /* forward */, 2, m2::PointD(13, 0));
RoadPos pos1(0, false /* backward */, 2, m2::PointD(13, 0));
RoadPos pos2(0, true /* forward */, 2, m2::PointD(13, 0));
RoadPos pos3(3, false /* forward */, 1, m2::PointD(15, 5));
RoadPos pos3(3, false /* backward */, 1, m2::PointD(15, 5));
RoadPos pos4(3, true /* forward */, 1, m2::PointD(15, 5));
vector<RoadPos> expected = {pos1, pos2, pos3, pos4};
TestNearestMock(m2::PointD(13, 3), 4, expected);