[Navigation] Refactoring of CarDirectionsEngine and PedestrianDirectionsEngine #2547

Merged
AntonM030481 merged 11 commits from navigation-refactoring into master 2022-05-16 16:29:59 +00:00
12 changed files with 1087 additions and 1103 deletions

View file

@ -1,81 +1,631 @@
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "routing/car_directions.hpp"
#include "routing/fake_feature_ids.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "routing/road_point.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "routing/router_delegate.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "routing/routing_exceptions.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "routing/routing_result_graph.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "routing/turns.hpp"
#include "routing/turns_generator.hpp"
#include "routing/turns_generator_utils.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "base/assert.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include <algorithm>
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#include "geometry/angles.hpp"
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
namespace routing
{
using namespace std;
using namespace turns;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
using namespace ftypes;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CarDirectionsEngine::CarDirectionsEngine(MwmDataSource & dataSource, shared_ptr<NumMwmIds> numMwmIds)
: DirectionsEngine(dataSource, move(numMwmIds))
{
}
bool CarDirectionsEngine::Generate(IndexRoadGraph const & graph,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vector<geometry::PointWithAltitude> const & path,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
base::Cancellable const & cancellable, Route::TTurns & turns,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
Route::TStreets & streetNames,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vector<geometry::PointWithAltitude> & routeGeometry,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vector<Segment> & segments)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
void CarDirectionsEngine::FixupTurns(std::vector<geometry::PointWithAltitude> const & junctions, Route::TTurns & turnsDir)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
CHECK(m_numMwmIds, ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
FixupCarTurns(junctions, turnsDir);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m_adjacentEdges.clear();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m_pathSegments.clear();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turns.clear();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
streetNames.clear();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
routeGeometry.clear();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
segments.clear();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#ifdef DEBUG
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto const & t : turnsDir)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
LOG(LDEBUG, (GetTurnString(t.m_turn), ":", t.m_index, t.m_sourceName, "-",
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
t.m_targetName, "exit:", t.m_exitNum));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
#endif
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
size_t const pathSize = path.size();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Note. According to Route::IsValid() method route of zero or one point is invalid.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (pathSize <= 1)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
void FixupCarTurns(std::vector<geometry::PointWithAltitude> const & junctions, Route::TTurns & turnsDir)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
uint32_t turn_index = base::asserted_cast<uint32_t>(junctions.size() - 1);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnsDir.emplace_back(TurnItem(turn_index, CarDirection::ReachedYourDestination));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double constexpr kMergeDistMeters = 15.0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// For turns that are not EnterRoundAbout/ExitRoundAbout exitNum is always equal to zero.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If a turn is EnterRoundAbout exitNum is a number of turns between two junctions:
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// (1) the route enters to the roundabout;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// (2) the route leaves the roundabout;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
uint32_t exitNum = 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnItem * currentEnterRoundAbout = nullptr;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (size_t idx = 0; idx < turnsDir.size(); )
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnItem & t = turnsDir[idx];
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (currentEnterRoundAbout && t.m_turn != CarDirection::StayOnRoundAbout && t.m_turn != CarDirection::LeaveRoundAbout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT(false, ("Only StayOnRoundAbout or LeaveRoundAbout are expected after EnterRoundAbout."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
exitNum = 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
currentEnterRoundAbout = nullptr;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
else if (t.m_turn == CarDirection::EnterRoundAbout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT(!currentEnterRoundAbout, ("It's not expected to find new EnterRoundAbout until previous EnterRoundAbout was leaved."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
currentEnterRoundAbout = &t;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT(exitNum == 0, ("exitNum is reset at start and after LeaveRoundAbout."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
exitNum = 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
else if (t.m_turn == CarDirection::StayOnRoundAbout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
++exitNum;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnsDir.erase(turnsDir.begin() + idx);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
else if (t.m_turn == CarDirection::LeaveRoundAbout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// It's possible for car to be on roundabout without entering it
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// if route calculation started at roundabout (e.g. if user made full turn on roundabout).
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (currentEnterRoundAbout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
currentEnterRoundAbout->m_exitNum = exitNum + 1;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
t.m_exitNum = exitNum + 1; // For LeaveRoundAbout turn.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
currentEnterRoundAbout = nullptr;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
exitNum = 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Merging turns which are closed to each other under some circumstance.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// distance(turnsDir[idx - 1].m_index, turnsDir[idx].m_index) < kMergeDistMeters
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// means the distance in meters between the former turn (idx - 1)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// and the current turn (idx).
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (idx > 0 && IsStayOnRoad(turnsDir[idx - 1].m_turn) &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
IsLeftOrRightTurn(turnsDir[idx].m_turn) &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CalcRouteDistanceM(junctions, turnsDir[idx - 1].m_index, turnsDir[idx].m_index) <
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
kMergeDistMeters)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnsDir.erase(turnsDir.begin() + idx - 1);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
++idx;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
SelectRecommendedLanes(turnsDir);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
void GetTurnDirectionBasic(IRoutingResult const & result, size_t const outgoingSegmentIndex,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnItem & turn);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
size_t CarDirectionsEngine::GetTurnDirection(IRoutingResult const & result, size_t const outgoingSegmentIndex,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
NumMwmIds const & numMwmIds,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
RoutingSettings const & vehicleSettings, TurnItem & turnItem)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
size_t skipTurnSegments = CheckUTurnOnRoute(result, outgoingSegmentIndex, numMwmIds, vehicleSettings, turnItem);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnItem.m_turn == CarDirection::None)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
GetTurnDirectionBasic(result, outgoingSegmentIndex, numMwmIds, vehicleSettings, turnItem);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Lane information.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnItem.m_turn != CarDirection::None)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & loadedSegments = result.GetSegments();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & ingoingSegment = loadedSegments[outgoingSegmentIndex - 1];
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnItem.m_lanes = ingoingSegment.m_lanes;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return skipTurnSegments;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/*!
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* \brief Calculates a turn instruction if the ingoing edge or (and) the outgoing edge belongs to a
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* roundabout.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* \return Returns one of the following results:
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* - TurnDirection::EnterRoundAbout if the ingoing edge does not belong to a roundabout
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* and the outgoing edge belongs to a roundabout.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* - TurnDirection::StayOnRoundAbout if the ingoing edge and the outgoing edge belong to a
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* roundabout
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* and there is a reasonalbe way to leave the junction besides the outgoing edge.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* This function does not return TurnDirection::StayOnRoundAbout for small ways to leave the
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* roundabout.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* - TurnDirection::NoTurn if the ingoing edge and the outgoing edge belong to a roundabout
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* (a) and there is a single way (outgoing edge) to leave the junction.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* (b) and there is a way(s) besides outgoing edge to leave the junction (the roundabout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* but it is (they are) relevantly small.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
*/
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CarDirection GetRoundaboutDirectionBasic(bool isIngoingEdgeRoundabout, bool isOutgoingEdgeRoundabout,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool isMultiTurnJunction, bool keepTurnByHighwayClass)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (isIngoingEdgeRoundabout && isOutgoingEdgeRoundabout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (isMultiTurnJunction)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return keepTurnByHighwayClass ? CarDirection::StayOnRoundAbout : CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!isIngoingEdgeRoundabout && isOutgoingEdgeRoundabout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::EnterRoundAbout;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (isIngoingEdgeRoundabout && !isOutgoingEdgeRoundabout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::LeaveRoundAbout;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT(false, ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Min difference of route and alternative turn abs angles in degrees
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// to ignore alternative turn (when route direction is GoStraight).
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double constexpr kMinAbsAngleDiffForStraightRoute = 25.0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Min difference of route and alternative turn abs angles in degrees
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// to ignore alternative turn (when route direction is bigger and GoStraight).
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double constexpr kMinAbsAngleDiffForBigStraightRoute = 5;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Min difference of route and alternative turn abs angles in degrees
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// to ignore this alternative candidate (when alternative road is the same or smaller).
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double constexpr kMinAbsAngleDiffForSameOrSmallerRoad = 35.0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/*!
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* \brief Returns false when other possible turns leads to service roads;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
*/
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool KeepRoundaboutTurnByHighwayClass(TurnCandidates const & possibleTurns,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnInfo const & turnInfo, NumMwmIds const & numMwmIds)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
Segment firstOutgoingSegment;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnInfo.m_outgoing->m_segmentRange.GetFirstSegment(numMwmIds, firstOutgoingSegment);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto const & t : possibleTurns.candidates)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (t.m_segment == firstOutgoingSegment)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (t.m_highwayClass != HighwayClass::Service)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return true;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CarDirection GetRoundaboutDirection(TurnInfo const & turnInfo, TurnCandidates const & nodes, NumMwmIds const & numMwmIds)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool const keepTurnByHighwayClass = KeepRoundaboutTurnByHighwayClass(nodes, turnInfo, numMwmIds);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return GetRoundaboutDirectionBasic(turnInfo.m_ingoing->m_onRoundabout, turnInfo.m_outgoing->m_onRoundabout,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
nodes.candidates.size() > 1, keepTurnByHighwayClass);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// \brief Return |CarDirection::ExitHighwayToRight| or |CarDirection::ExitHighwayToLeft|
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// or return |CarDirection::None| if no exit is detected.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// \note The function makes a decision about turn based on geometry of the route and turn
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// candidates, so it works correctly for both left and right hand traffic.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CarDirection TryToGetExitDirection(TurnCandidates const & possibleTurns, TurnInfo const & turnInfo,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
Segment const & firstOutgoingSeg, CarDirection const intermediateDirection)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!possibleTurns.isCandidatesAngleValid)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!IsHighway(turnInfo.m_ingoing->m_highwayClass, turnInfo.m_ingoing->m_isLink))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!turnInfo.m_outgoing->m_isLink && !(IsSmallRoad(turnInfo.m_outgoing->m_highwayClass) && IsGoStraightOrSlightTurn(intermediateDirection)))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// At this point it is known that the route goes form a highway to a link road or to a small road
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// which has a slight angle with the highway.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Considering cases when the route goes from a highway to a link or a small road.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Checking all turn candidates (sorted by their angles) and looking for the road which is a
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// continuation of the ingoing segment. If the continuation is on the right hand of the route
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// it's an exit to the left. If the continuation is on the left hand of the route
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// it's an exit to the right.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Note. The angle which is used for sorting turn candidates in |possibleTurns.candidates|
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// is a counterclockwise angle between the ingoing route edge and corresponding candidate.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// For left turns the angle is less than zero and for right ones it is more than zero.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool isCandidateBeforeOutgoing = true;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool isHighwayCandidateBeforeOutgoing = true;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
size_t highwayCandidateNumber = 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto const & c : possibleTurns.candidates)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (c.m_segment == firstOutgoingSeg)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
isCandidateBeforeOutgoing = false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (IsHighway(c.m_highwayClass, c.m_isLink))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
++highwayCandidateNumber;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (highwayCandidateNumber >= 2)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::None; // There are two or more highway candidates from the junction.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
isHighwayCandidateBeforeOutgoing = isCandidateBeforeOutgoing;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (highwayCandidateNumber == 1)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return isHighwayCandidateBeforeOutgoing ? CarDirection::ExitHighwayToRight
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
: CarDirection::ExitHighwayToLeft;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// * \returns true when
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// * - the route leads from one big road to another one;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// * - and the other possible turns lead to small roads or these turns too sharp.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// * Returns false otherwise.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// \param routeDirection is route direction.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// \param routeAngle is route angle.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// \param turnCandidates is all possible ways out from a junction except uturn.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// \param turnInfo is information about ingoing and outgoing segments of the route.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool CanDiscardTurnByHighwayClassOrAngles(CarDirection const routeDirection,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double const routeAngle,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
std::vector<TurnCandidate> const & turnCandidates,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnInfo const & turnInfo,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
NumMwmIds const & numMwmIds)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!IsGoStraightOrSlightTurn(routeDirection))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return false;
IRoadGraph::EdgeVector routeEdges;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
graph.GetRouteEdges(routeEdges);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnCandidates.size() < 2)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return true;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
HighwayClass outgoingRouteRoadClass = turnInfo.m_outgoing->m_highwayClass;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
HighwayClass ingoingRouteRoadClass = turnInfo.m_ingoing->m_highwayClass;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
Segment firstOutgoingSegment;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnInfo.m_outgoing->m_segmentRange.GetFirstSegment(numMwmIds, firstOutgoingSegment);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto const & t : turnCandidates)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Let's consider all outgoing segments except for route outgoing segment.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (t.m_segment == firstOutgoingSegment)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Min difference of route and alternative turn abs angles in degrees
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// to ignore this alternative candidate (when route goes from non-link to link).
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double constexpr kMinAbsAngleDiffForGoLink = 70.0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If route goes from non-link to link and there is not too sharp candidate then turn can't be discarded.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!turnInfo.m_ingoing->m_isLink && turnInfo.m_outgoing->m_isLink && abs(t.m_angle) < abs(routeAngle) + kMinAbsAngleDiffForGoLink)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
HighwayClass candidateRoadClass = t.m_highwayClass;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If outgoing route road is significantly larger than candidate, the candidate can be ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) <= kMinHighwayClassDiff)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If outgoing route's road is significantly larger than candidate's service road, the candidate can be ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) <= kMinHighwayClassDiffForService && candidateRoadClass == HighwayClass::Service)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If igngoing and outgoing edges are not links
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// and outgoing route road is the same or large than ingoing
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// then candidate-link can be ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!turnInfo.m_ingoing->m_isLink && !turnInfo.m_outgoing->m_isLink &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CalcDiffRoadClasses(outgoingRouteRoadClass, ingoingRouteRoadClass) <= 0 &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
t.m_isLink)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If alternative cadidate's road size is the same or smaller
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// and it's angle is sharp enough compared to the route it can be ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) <= 0 &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
abs(t.m_angle) > abs(routeAngle) + kMinAbsAngleDiffForSameOrSmallerRoad)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (routeDirection == CarDirection::GoStraight)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If alternative cadidate's road size is smaller
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// and it's angle is not very close to the route's one - it can be ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) < 0 &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
abs(t.m_angle) > abs(routeAngle) + kMinAbsAngleDiffForBigStraightRoute)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If outgoing route road is the same or large than ingoing
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// and candidate's angle is sharp enough compared to the route it can be ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (CalcDiffRoadClasses(outgoingRouteRoadClass, ingoingRouteRoadClass) <= 0 &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
abs(t.m_angle) > abs(routeAngle) + kMinAbsAngleDiffForStraightRoute)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (routeEdges.empty())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (cancellable.IsCancelled())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
FillPathSegmentsAndAdjacentEdgesMap(graph, path, routeEdges, cancellable);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (cancellable.IsCancelled())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
RoutingEngineResult resultGraph(routeEdges, m_adjacentEdges, m_pathSegments);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CHECK_NOT_EQUAL(m_vehicleType, VehicleType::Count, (m_vehicleType));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const res = MakeTurnAnnotation(resultGraph, *m_numMwmIds, m_vehicleType, cancellable,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
routeGeometry, turns, streetNames, segments);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (res != RouterResultCode::NoError)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CHECK_EQUAL(
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
routeGeometry.size(), pathSize,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
("routeGeometry and path have different sizes. routeGeometry size:", routeGeometry.size(),
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
"path size:", pathSize, "segments size:", segments.size(), "routeEdges size:",
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
routeEdges.size(), "resultGraph.GetSegments() size:", resultGraph.GetSegments().size()));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// In case of bicycle routing |m_pathSegments| may have an empty
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// |LoadedPathSegment::m_segments| fields. In that case |segments| is empty
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// so size of |segments| is not equal to size of |routeEdges|.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!segments.empty())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CHECK_EQUAL(segments.size(), routeEdges.size(), ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return true;
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/*!
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* \brief Corrects |turn.m_turn| if |turn.m_turn == CarDirection::GoStraight|.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
* If the other way is not sharp enough, turn.m_turn is set to |turnToSet|.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
*/
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
void CorrectGoStraight(TurnCandidate const & notRouteCandidate, double const routeAngle, CarDirection const & turnToSet,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnItem & turn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turn.m_turn != CarDirection::GoStraight)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Correct turn if alternative cadidate's angle is not sharp enough compared to the route.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (abs(notRouteCandidate.m_angle) < abs(routeAngle) + kMinAbsAngleDiffForStraightRoute)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
LOG(LDEBUG, ("Turn: ", turn.m_index, " GoStraight correction."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = turnToSet;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If the route goes along the rightmost or the leftmost way among available ones:
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// 1. RightmostDirection or LeftmostDirection is selected
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// 2. If the turn direction is |CarDirection::GoStraight|
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// and there's another not sharp enough turn
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// GoStraight is corrected to TurnSlightRight/TurnSlightLeft
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// to avoid ambiguity for GoStraight direction: 2 or more almost straight turns.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
void CorrectRightmostAndLeftmost(std::vector<TurnCandidate> const & turnCandidates,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
Segment const & firstOutgoingSeg, double const turnAngle,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnItem & turn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// turnCandidates are sorted by angle from leftmost to rightmost.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Normally no duplicates should be found. But if they are present we can't identify the leftmost/rightmost by order.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (adjacent_find(turnCandidates.begin(), turnCandidates.end(), base::EqualsBy(&TurnCandidate::m_angle)) != turnCandidates.end())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
LOG(LWARNING, ("nodes.candidates are not expected to have same m_angle."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double constexpr kMaxAbsAngleConsideredLeftOrRightMost = 90;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Go from left to right to findout if the route goes through the leftmost candidate and fixes can be applied.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Other candidates which are sharper than kMaxAbsAngleConsideredLeftOrRightMost are ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto candidate = turnCandidates.begin(); candidate != turnCandidates.end(); ++candidate)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (candidate->m_segment == firstOutgoingSeg && candidate + 1 != turnCandidates.end())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// The route goes along the leftmost candidate.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = LeftmostDirection(turnAngle);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (IntermediateDirection(turnAngle) != turn.m_turn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
LOG(LDEBUG, ("Turn: ", turn.m_index, " LeftmostDirection correction."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Compare with the next candidate to the right.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CorrectGoStraight(*(candidate + 1), candidate->m_angle, CarDirection::TurnSlightLeft, turn);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
break;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Check if this candidate is considered as leftmost as not too sharp.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If yes - this candidate is leftmost, not route's one.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (candidate->m_angle > -kMaxAbsAngleConsideredLeftOrRightMost)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
break;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Go from right to left to findout if the route goes through the rightmost candidate anf fixes can be applied.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Other candidates which are sharper than kMaxAbsAngleConsideredLeftOrRightMost are ignored.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto candidate = turnCandidates.rbegin(); candidate != turnCandidates.rend(); ++candidate)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (candidate->m_segment == firstOutgoingSeg && candidate + 1 != turnCandidates.rend())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// The route goes along the rightmost candidate.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = RightmostDirection(turnAngle);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (IntermediateDirection(turnAngle) != turn.m_turn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
LOG(LDEBUG, ("Turn: ", turn.m_index, " RighmostDirection correction."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Compare with the next candidate to the left.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CorrectGoStraight(*(candidate + 1), candidate->m_angle, CarDirection::TurnSlightRight, turn);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
break;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Check if this candidate is considered as rightmost as not too sharp.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If yes - this candidate is rightmost, not route's one.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (candidate->m_angle < kMaxAbsAngleConsideredLeftOrRightMost)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
break;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
};
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
void GetTurnDirectionBasic(IRoutingResult const & result, size_t const outgoingSegmentIndex,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnItem & turn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnInfo turnInfo;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!GetTurnInfo(result, outgoingSegmentIndex, vehicleSettings, turnInfo))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_sourceName = turnInfo.m_ingoing->m_name;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_targetName = turnInfo.m_outgoing->m_name;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = CarDirection::None;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT_GREATER(turnInfo.m_ingoing->m_path.size(), 1, ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnCandidates nodes;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
size_t ingoingCount;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m2::PointD const junctionPoint = turnInfo.m_ingoing->m_path.back().GetPoint();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
result.GetPossibleTurns(turnInfo.m_ingoing->m_segmentRange, junctionPoint, ingoingCount, nodes);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (nodes.isCandidatesAngleValid)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT(is_sorted(nodes.candidates.begin(), nodes.candidates.end(), base::LessBy(&TurnCandidate::m_angle)),
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
("Turn candidates should be sorted by its angle field."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// @todo Proper handling of isCandidatesAngleValid == False, when we don't have angles of candidates.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (nodes.candidates.size() == 0)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// No turns are needed on transported road.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnInfo.m_ingoing->m_highwayClass == HighwayClass::Transported && turnInfo.m_outgoing->m_highwayClass == HighwayClass::Transported)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
Segment firstOutgoingSeg;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!turnInfo.m_outgoing->m_segmentRange.GetFirstSegment(numMwmIds, firstOutgoingSeg))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CorrectCandidatesSegmentByOutgoing(turnInfo, firstOutgoingSeg, nodes);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
RemoveUTurnCandidate(turnInfo, numMwmIds, nodes.candidates);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & turnCandidates = nodes.candidates;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Check for enter or exit to/from roundabout.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnInfo.m_ingoing->m_onRoundabout || turnInfo.m_outgoing->m_onRoundabout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = GetRoundaboutDirection(turnInfo, nodes, numMwmIds);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double const turnAngle = CalcTurnAngle(result, outgoingSegmentIndex, numMwmIds, vehicleSettings);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CarDirection const intermediateDirection = IntermediateDirection(turnAngle);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Checking for exits from highways.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = TryToGetExitDirection(nodes, turnInfo, firstOutgoingSeg, intermediateDirection);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turn.m_turn != CarDirection::None)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnCandidates.size() == 1)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT(turnCandidates.front().m_segment == firstOutgoingSeg, ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (IsGoStraightOrSlightTurn(intermediateDirection))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// IngoingCount includes ingoing segment and reversed outgoing (if it is not one-way).
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If any other one is present, turn (not straight or slight) is kept to prevent user from going to oneway alternative.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// @todo Min abs angle of ingoing ones should be considered. If it's much bigger than route angle - ignore ingoing ones.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
/// Now this data is not available from IRoutingResult::GetPossibleTurns().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (ingoingCount <= 1 + size_t(!turnInfo.m_outgoing->m_isOneWay))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// This angle is calculated using only 1 segment back and forward, not like turnAngle.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double turnOneSegmentAngle = CalcOneSegmentTurnAngle(turnInfo);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// To not discard some disputable turns let's use max by modulus from turnOneSegmentAngle and turnAngle.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// It's natural since angles of turnCandidates are calculated in IRoutingResult::GetPossibleTurns()
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// according to CalcOneSegmentTurnAngle logic. And to be safe turnAngle is used too.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double turnAngleToCompare = turnAngle;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnOneSegmentAngle <= 0 && turnAngle <= 0)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnAngleToCompare = min(turnOneSegmentAngle, turnAngle);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
else if (turnOneSegmentAngle >= 0 && turnAngle >= 0)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turnAngleToCompare = max(turnOneSegmentAngle, turnAngle);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
else if (abs(turnOneSegmentAngle) > 10)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
LOG(LWARNING, ("Significant angles are expected to have the same sign."));
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (CanDiscardTurnByHighwayClassOrAngles(intermediateDirection, turnAngleToCompare, turnCandidates, turnInfo, numMwmIds))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = intermediateDirection;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (turnCandidates.size() >= 2 && nodes.isCandidatesAngleValid)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CorrectRightmostAndLeftmost(turnCandidates, firstOutgoingSeg, turnAngle, turn);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
size_t CheckUTurnOnRoute(IRoutingResult const & result, size_t const outgoingSegmentIndex,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
TurnItem & turn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
size_t constexpr kUTurnLookAhead = 3;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
double constexpr kUTurnHeadingSensitivity = math::pi / 10.0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & segments = result.GetSegments();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// In this function we process the turn between the previous and the current
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// segments. So we need a shift to get the previous segment.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT_GREATER(segments.size(), 1, ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT_GREATER(outgoingSegmentIndex, 0, ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
ASSERT_GREATER(segments.size(), outgoingSegmentIndex, ());
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & masterSegment = segments[outgoingSegmentIndex - 1];
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (masterSegment.m_path.size() < 2)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Roundabout is not the UTurn.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (masterSegment.m_onRoundabout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (size_t i = 0; i < kUTurnLookAhead && i + outgoingSegmentIndex < segments.size(); ++i)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & checkedSegment = segments[outgoingSegmentIndex + i];
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (checkedSegment.m_path.size() < 2)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (checkedSegment.m_name == masterSegment.m_name &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
checkedSegment.m_highwayClass == masterSegment.m_highwayClass &&
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
checkedSegment.m_isLink == masterSegment.m_isLink && !checkedSegment.m_onRoundabout)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & path = masterSegment.m_path;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & pointBeforeTurn = path[path.size() - 2];
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & turnPoint = path[path.size() - 1];
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto const & pointAfterTurn = checkedSegment.m_path[1];
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Same segment UTurn case.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (i == 0)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// TODO Fix direction calculation.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Warning! We can not determine UTurn direction in single edge case. So we use UTurnLeft.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// We decided to add driving rules (left-right sided driving) to mwm header.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (pointBeforeTurn == pointAfterTurn && turnPoint != pointBeforeTurn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = CarDirection::UTurnLeft;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 1;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Wide UTurn must have link in it's middle.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Avoid the UTurn on unnamed roads inside the rectangle based distinct.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (checkedSegment.m_name.empty())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Avoid returning to the same edge after uturn somewere else.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (pointBeforeTurn == pointAfterTurn)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m2::PointD const v1 = turnPoint.GetPoint() - pointBeforeTurn.GetPoint();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m2::PointD const v2 = pointAfterTurn.GetPoint() - checkedSegment.m_path[0].GetPoint();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
auto angle = ang::TwoVectorsAngle(m2::PointD::Zero(), v1, v2);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (!base::AlmostEqualAbs(angle, math::pi, kUTurnHeadingSensitivity))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Determine turn direction.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m2::PointD const junctionPoint = masterSegment.m_path.back().GetPoint();
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m2::PointD const ingoingPoint = GetPointForTurn(
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
result, outgoingSegmentIndex, numMwmIds, vehicleSettings.m_maxIngoingPointsCount,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vehicleSettings.m_minIngoingDistMeters, false /* forward */);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
m2::PointD const outgoingPoint = GetPointForTurn(
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
result, outgoingSegmentIndex, numMwmIds, vehicleSettings.m_maxOutgoingPointsCount,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vehicleSettings.m_minOutgoingDistMeters, true /* forward */);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (PiMinusTwoVectorsAngle(junctionPoint, ingoingPoint, outgoingPoint) < 0)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = CarDirection::UTurnLeft;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
else
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
turn.m_turn = CarDirection::UTurnRight;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return i + 1;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return 0;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool FixupLaneSet(CarDirection turn, std::vector<SingleLaneInfo> & lanes,
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
function<bool(LaneWay l, CarDirection t)> checker)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
bool isLaneConformed = false;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// There are two nested loops below. (There is a for-loop in checker.)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// But the number of calls of the body of inner one (in checker) is relatively small.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Less than 10 in most cases.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto & singleLane : lanes)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (LaneWay laneWay : singleLane.m_lane)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (checker(laneWay, turn))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
singleLane.m_isRecommended = true;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
isLaneConformed = true;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
break;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
return isLaneConformed;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
void SelectRecommendedLanes(Route::TTurns & turnsDir)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
for (auto & t : turnsDir)
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
{
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
std::vector<SingleLaneInfo> & lanes = t.m_lanes;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (lanes.empty())
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
CarDirection const turn = t.m_turn;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// Checking if threre are elements in lanes which correspond with the turn exactly.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If so fixing up all the elements in lanes which correspond with the turn.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
if (FixupLaneSet(turn, lanes, &IsLaneWayConformedTurnDirection))
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
continue;
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// If not checking if there are elements in lanes which corresponds with the turn
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
// approximately. If so fixing up all these elements.
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
FixupLaneSet(turn, lanes, &IsLaneWayConformedTurnDirectionApproximately);
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
}
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
} // namespace routing

vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().
vng commented 2022-05-13 17:40:07 +00:00 (Migrated from github.com)
Review

Sure that junctions is not empty here?

Sure that junctions is not empty here?
vng commented 2022-05-13 17:48:02 +00:00 (Migrated from github.com)
Review

So if validFirstOutgoingSeg == false, we can return false immediately before this loop.
Or there is an error here in logic ..

So if validFirstOutgoingSeg == false, we can return false immediately before this loop. Or there is an error here in logic ..
vng commented 2022-05-13 17:50:52 +00:00 (Migrated from github.com)
Review

Should we take out named constant = 70?

Should we take out named constant = 70?
AntonM030481 commented 2022-05-16 08:24:11 +00:00 (Migrated from github.com)
Review

Yes. Added assert just in case.

Yes. Added assert just in case.
AntonM030481 commented 2022-05-16 12:34:12 +00:00 (Migrated from github.com)
Review

ok

ok
AntonM030481 commented 2022-05-16 13:14:58 +00:00 (Migrated from github.com)
Review

In fact this check can be removed.
It was checked before in GetTurnDirectionBasic().

In fact this check can be removed. It was checked before in GetTurnDirectionBasic().

View file

@ -1,31 +1,63 @@
#pragma once
#include "routing/directions_engine.hpp"
#include "routing/route.hpp"
#include "routing/segment.hpp"
#include "routing_common/num_mwm_id.hpp"
#include "indexer/data_source.hpp"
#include "geometry/point_with_altitude.hpp"
#include <map>
#include <memory>
#include <vector>
namespace routing
{
class CarDirectionsEngine : public DirectionsEngine
{
public:
CarDirectionsEngine(MwmDataSource & dataSource, std::shared_ptr<NumMwmIds> numMwmIds);
// DirectionsEngine override:
bool Generate(IndexRoadGraph const & graph, std::vector<geometry::PointWithAltitude> const & path,
base::Cancellable const & cancellable, Route::TTurns & turns,
Route::TStreets & streetNames,
std::vector<geometry::PointWithAltitude> & routeGeometry,
std::vector<Segment> & segments) override;
protected:
virtual size_t GetTurnDirection(turns::IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
RoutingSettings const & vehicleSettings, turns::TurnItem & turn);
virtual void FixupTurns(std::vector<geometry::PointWithAltitude> const & junctions,
Route::TTurns & turnsDir);
};
/*!
* \brief Selects lanes which are recommended for an end user.
*/
void SelectRecommendedLanes(Route::TTurns & turnsDir);
void FixupCarTurns(std::vector<geometry::PointWithAltitude> const & junctions, Route::TTurns & turnsDir);
/*!
* \brief Finds an U-turn that starts from master segment and returns how many segments it lasts.
* \returns an index in |segments| that has the opposite direction with master segment
* (|segments[currentSegment - 1]|) and 0 if there is no UTurn.
* \warning |currentSegment| must be greater than 0.
*/
size_t CheckUTurnOnRoute(turns::IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
turns::TurnItem & turn);
/*!
* \brief Calculates a turn instruction if the ingoing edge or (and) the outgoing edge belongs to a
* roundabout.
* \return Returns one of the following results:
* - TurnDirection::EnterRoundAbout if the ingoing edge does not belong to a roundabout
* and the outgoing edge belongs to a roundabout.
* - TurnDirection::StayOnRoundAbout if the ingoing edge and the outgoing edge belong to a
* roundabout
* and there is a reasonalbe way to leave the junction besides the outgoing edge.
* This function does not return TurnDirection::StayOnRoundAbout for small ways to leave the
* roundabout.
* - TurnDirection::NoTurn if the ingoing edge and the outgoing edge belong to a roundabout
* (a) and there is a single way (outgoing edge) to leave the junction.
* (b) and there is a way(s) besides outgoing edge to leave the junction (the roundabout)
* but it is (they are) relevantly small.
*/
turns::CarDirection GetRoundaboutDirectionBasic(bool isIngoingEdgeRoundabout, bool isOutgoingEdgeRoundabout,
bool isMultiTurnJunction, bool keepTurnByHighwayClass);
} // namespace routing

View file

@ -3,6 +3,7 @@
#include "routing/data_source.hpp"
#include "routing/fake_feature_ids.hpp"
#include "routing/routing_helpers.hpp"
#include "routing/routing_callbacks.hpp"
#include "traffic/traffic_info.hpp"
@ -223,4 +224,180 @@ void DirectionsEngine::FillPathSegmentsAndAdjacentEdgesMap(
startSegId = kInvalidSegId;
}
}
bool DirectionsEngine::Generate(IndexRoadGraph const & graph,
vector<geometry::PointWithAltitude> const & path,
base::Cancellable const & cancellable, Route::TTurns & turns,
Route::TStreets & streetNames,
vector<geometry::PointWithAltitude> & routeGeometry,
vector<Segment> & segments)
{
CHECK(m_numMwmIds, ());
m_adjacentEdges.clear();
m_pathSegments.clear();
turns.clear();
streetNames.clear();
segments.clear();
IndexRoadGraph::EdgeVector routeEdges;
CHECK_NOT_EQUAL(m_vehicleType, VehicleType::Count, (m_vehicleType));
if (m_vehicleType == VehicleType::Transit)
{
routeGeometry = path;
graph.GetRouteSegments(segments);
graph.GetRouteEdges(routeEdges);
turns.emplace_back(routeEdges.size(), turns::PedestrianDirection::ReachedYourDestination);
return true;
}
routeGeometry.clear();
if (path.size() <= 1)
return false;
graph.GetRouteEdges(routeEdges);
if (routeEdges.empty())
return false;
if (cancellable.IsCancelled())
return false;
FillPathSegmentsAndAdjacentEdgesMap(graph, path, routeEdges, cancellable);
if (cancellable.IsCancelled())
return false;
auto const res = MakeTurnAnnotation(routeEdges, cancellable,
routeGeometry, turns, streetNames, segments);
if (res != RouterResultCode::NoError)
return false;
// In case of bicycle routing |m_pathSegments| may have an empty
// |LoadedPathSegment::m_segments| fields. In that case |segments| is empty
// so size of |segments| is not equal to size of |routeEdges|.
if (!segments.empty())
CHECK_EQUAL(segments.size(), routeEdges.size(), ());
CHECK_EQUAL(
routeGeometry.size(), path.size(),
("routeGeometry and path have different sizes. routeGeometry size:", routeGeometry.size(),
"path size:", path.size(), "segments size:", segments.size(), "routeEdges size:", routeEdges.size()));
return true;
}
/*!
* \brief Compute turn and time estimation structs for the abstract route result.
* \param result abstract routing result to annotate.
* \param delegate Routing callbacks delegate.
* \param points Storage for unpacked points of the path.
* \param turnsDir output turns annotation storage.
* \param streets output street names along the path.
* \param segments route segments.
* \return routing operation result code.
*/
// Normally loadedSegments structure is:
// - Start point. Fake loop LoadedPathSegment with 1 segment of zero length.
// - Straight jump from start point to the beginning of real route. LoadedPathSegment with 1 segment.
// - Real route. N LoadedPathSegments, each with arbitrary amount of segments. N >= 1.
// - Straight jump from the end of real route to finish point. LoadedPathSegment with 1 segment.
// - Finish point. Fake loop LoadedPathSegment with 1 segment of zero length.
// So minimal amount of segments is 5.
// Resulting structure of turnsDir:
// No Turn for 0th segment (no ingoing). m_index == 0.
// No Turn for 1st segment (ingoing fake loop) - at start point. m_index == 1.
// No Turn for 2nd (ingoing == jump) - at beginning of real route. m_index == 2.
// Possible turn for next N-1 segments. m_index >= 3.
// No Turn for (2 + N + 1)th segment (outgoing jump) - at finish point. m_index = 3 + M.
// No Turn for (2 + N + 2)th segment (outgoing fake loop) - at finish point. m_index == 4 + M.
// Added ReachedYourDestination - at finish point. m_index == 4 + M.
// Where M - total amount of all segments from all LoadedPathSegments (size of |segments|).
// So minimum m_index of ReachedYourDestination is 5 (real route with single segment),
// and minimal |turnsDir| is - single ReachedYourDestination with m_index == 5.
RouterResultCode DirectionsEngine::MakeTurnAnnotation(IndexRoadGraph::EdgeVector const & routeEdges,
base::Cancellable const & cancellable,
std::vector<geometry::PointWithAltitude> & junctions,
Route::TTurns & turnsDir, Route::TStreets & streets,
std::vector<Segment> & segments)
{
RoutingEngineResult result(routeEdges, m_adjacentEdges, m_pathSegments);
LOG(LDEBUG, ("Shortest path length:", result.GetPathLength()));
if (cancellable.IsCancelled())
return RouterResultCode::Cancelled;
size_t skipTurnSegments = 0;
auto const & loadedSegments = result.GetSegments();
segments.reserve(loadedSegments.size());
RoutingSettings const vehicleSettings = GetRoutingSettings(m_vehicleType);
for (auto loadedSegmentIt = loadedSegments.cbegin(); loadedSegmentIt != loadedSegments.cend(); ++loadedSegmentIt)
{
CHECK(loadedSegmentIt->IsValid(), ());
// Street names contain empty names too for avoiding of freezing of old street name while
// moving along unnamed street.
streets.emplace_back(max(junctions.size(), static_cast<size_t>(1)) - 1, loadedSegmentIt->m_name);
// Turns information.
if (!junctions.empty() && skipTurnSegments == 0)
{
size_t const outgoingSegmentIndex = base::asserted_cast<size_t>(distance(loadedSegments.begin(), loadedSegmentIt));
TurnItem turnItem;
turnItem.m_index = static_cast<uint32_t>(junctions.size() - 1);
skipTurnSegments = GetTurnDirection(result, outgoingSegmentIndex, *m_numMwmIds, vehicleSettings, turnItem);
if (!turnItem.IsTurnNone())
turnsDir.push_back(move(turnItem));
}
if (skipTurnSegments > 0)
--skipTurnSegments;
// Path geometry.
CHECK_GREATER_OR_EQUAL(loadedSegmentIt->m_path.size(), 2, ());
// Note. Every LoadedPathSegment in TUnpackedPathSegments contains LoadedPathSegment::m_path
// of several Junctions. Last PointWithAltitude in a LoadedPathSegment::m_path is equal to first
// junction in next LoadedPathSegment::m_path in vector TUnpackedPathSegments:
// *---*---*---*---* *---* *---*---*---*
// *---*---* *---*---*---*
// To prevent having repetitions in |junctions| list it's necessary to take the first point only
// from the first item of |loadedSegments|. The beginning should be ignored for the rest
// |m_path|.
junctions.insert(junctions.end(), loadedSegmentIt == loadedSegments.cbegin()
? loadedSegmentIt->m_path.cbegin()
: loadedSegmentIt->m_path.cbegin() + 1,
loadedSegmentIt->m_path.cend());
segments.insert(segments.end(), loadedSegmentIt->m_segments.cbegin(),
loadedSegmentIt->m_segments.cend());
}
// Path found. Points will be replaced by start and end edges junctions.
if (junctions.size() == 1)
junctions.push_back(junctions.front());
if (junctions.size() < 2)
return RouterResultCode::RouteNotFound;
junctions.front() = result.GetStartPoint();
junctions.back() = result.GetEndPoint();
FixupTurns(junctions, turnsDir);
return RouterResultCode::NoError;
}
} // namespace routing

View file

@ -11,7 +11,6 @@
#include "geometry/point_with_altitude.hpp"
#include "base/assert.hpp"
#include "base/cancellable.hpp"
#include <memory>
@ -19,6 +18,13 @@
namespace routing
{
namespace turns
{
class IRoutingResult;
struct TurnItem;
}
enum class RouterResultCode;
class MwmDataSource;
class DirectionsEngine
@ -37,17 +43,27 @@ public:
/// \brief Generates all args which are passed by reference.
/// \param path is points of the route. It should not be empty.
/// \returns true if fields passed by reference are filled correctly and false otherwise.
virtual bool Generate(IndexRoadGraph const & graph,
std::vector<geometry::PointWithAltitude> const & path,
base::Cancellable const & cancellable, Route::TTurns & turns,
Route::TStreets & streetNames,
std::vector<geometry::PointWithAltitude> & routeGeometry,
std::vector<Segment> & segments) = 0;
bool Generate(IndexRoadGraph const & graph,
std::vector<geometry::PointWithAltitude> const & path,
base::Cancellable const & cancellable, Route::TTurns & turns,
Route::TStreets & streetNames,
std::vector<geometry::PointWithAltitude> & routeGeometry,
std::vector<Segment> & segments);
void Clear();
void SetVehicleType(VehicleType const & vehicleType) { m_vehicleType = vehicleType; }
protected:
/*!
* \brief GetTurnDirection makes a primary decision about turns on the route.
* \param outgoingSegmentIndex index of an outgoing segments in vector result.GetSegments().
* \param turn is used for keeping the result of turn calculation.
*/
virtual size_t GetTurnDirection(turns::IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
RoutingSettings const & vehicleSettings, turns::TurnItem & turn) = 0;
virtual void FixupTurns(std::vector<geometry::PointWithAltitude> const & junctions,
Route::TTurns & turnsDir) = 0;
std::unique_ptr<FeatureType> GetFeature(FeatureID const & featureId);
void LoadPathAttributes(FeatureID const & featureId, LoadedPathSegment & pathSegment);
void GetSegmentRangeAndAdjacentEdges(IRoadGraph::EdgeListT const & outgoingEdges,
@ -71,5 +87,12 @@ protected:
MwmDataSource & m_dataSource;
std::shared_ptr<NumMwmIds> m_numMwmIds;
VehicleType m_vehicleType = VehicleType::Count;
private:
RouterResultCode MakeTurnAnnotation(IndexRoadGraph::EdgeVector const & routeEdges,
base::Cancellable const & cancellable,
std::vector<geometry::PointWithAltitude> & junctions,
Route::TTurns & turnsDir, Route::TStreets & streets,
std::vector<Segment> & segments);
};
} // namespace routing

View file

@ -1,84 +1,113 @@
#include "routing/pedestrian_directions.hpp"
#include "routing/road_graph.hpp"
#include "routing/turns_generator.hpp"
#include "base/assert.hpp"
#include "base/logging.hpp"
#include "routing/turns.hpp"
#include "routing/turns_generator_utils.hpp"
#include <utility>
using namespace std;
namespace routing
{
using namespace std;
using namespace turns;
PedestrianDirectionsEngine::PedestrianDirectionsEngine(MwmDataSource & dataSource, shared_ptr<NumMwmIds> numMwmIds)
: DirectionsEngine(dataSource, move(numMwmIds))
{
}
bool PedestrianDirectionsEngine::Generate(IndexRoadGraph const & graph,
vector<geometry::PointWithAltitude> const & path,
base::Cancellable const & cancellable,
Route::TTurns & turns, Route::TStreets & streetNames,
vector<geometry::PointWithAltitude> & routeGeometry,
vector<Segment> & segments)
// Angles in degrees for finding route segments with no actual forks.
double constexpr kMaxForwardAngleCandidates = 95.0;
double constexpr kMaxForwardAngleActual = 60.0;
size_t PedestrianDirectionsEngine::GetTurnDirection(IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
RoutingSettings const & vehicleSettings, TurnItem & turn)
{
CHECK(m_numMwmIds, ());
TurnInfo turnInfo;
if (!GetTurnInfo(result, outgoingSegmentIndex, vehicleSettings, turnInfo))
return 0;
m_adjacentEdges.clear();
m_pathSegments.clear();
turns.clear();
streetNames.clear();
segments.clear();
double const turnAngle = CalcTurnAngle(result, outgoingSegmentIndex, numMwmIds, vehicleSettings);
IndexRoadGraph::EdgeVector routeEdges;
turn.m_sourceName = turnInfo.m_ingoing->m_name;
turn.m_targetName = turnInfo.m_outgoing->m_name;
turn.m_pedestrianTurn = PedestrianDirection::None;
CHECK_NOT_EQUAL(m_vehicleType, VehicleType::Count, (m_vehicleType));
ASSERT_GREATER(turnInfo.m_ingoing->m_path.size(), 1, ());
if (m_vehicleType == VehicleType::Transit)
TurnCandidates nodes;
size_t ingoingCount = 0;
m2::PointD const junctionPoint = turnInfo.m_ingoing->m_path.back().GetPoint();
result.GetPossibleTurns(turnInfo.m_ingoing->m_segmentRange, junctionPoint, ingoingCount, nodes);
if (nodes.isCandidatesAngleValid)
{
routeGeometry = path;
graph.GetRouteSegments(segments);
graph.GetRouteEdges(routeEdges);
turns.emplace_back(routeEdges.size(), turns::PedestrianDirection::ReachedYourDestination);
return true;
ASSERT(is_sorted(nodes.candidates.begin(), nodes.candidates.end(), base::LessBy(&TurnCandidate::m_angle)),
("Turn candidates should be sorted by its angle field."));
}
routeGeometry.clear();
/// @todo Proper handling of isCandidatesAngleValid == False, when we don't have angles of candidates.
if (path.size() <= 1)
return false;
if (nodes.candidates.size() == 0)
return 0;
size_t const pathSize = path.size();
turn.m_pedestrianTurn = IntermediateDirectionPedestrian(turnAngle);
graph.GetRouteEdges(routeEdges);
if (turn.m_pedestrianTurn == PedestrianDirection::GoStraight)
{
turn.m_pedestrianTurn = PedestrianDirection::None;
return 0;
}
if (routeEdges.empty())
return false;
Segment firstOutgoingSeg;
if (!turnInfo.m_outgoing->m_segmentRange.GetFirstSegment(numMwmIds, firstOutgoingSeg))
return 0;
if (cancellable.IsCancelled())
return false;
CorrectCandidatesSegmentByOutgoing(turnInfo, firstOutgoingSeg, nodes);
RemoveUTurnCandidate(turnInfo, numMwmIds, nodes.candidates);
FillPathSegmentsAndAdjacentEdgesMap(graph, path, routeEdges, cancellable);
// If there is no fork on the road we don't need to generate any turn. It is pointless because
// there is no possibility of leaving the route.
if (nodes.candidates.size() <= 1)
turn.m_pedestrianTurn = PedestrianDirection::None;
if (std::fabs(CalcOneSegmentTurnAngle(turnInfo)) < kMaxForwardAngleActual && HasSingleForwardTurn(nodes, kMaxForwardAngleCandidates))
turn.m_pedestrianTurn = PedestrianDirection::None;
if (cancellable.IsCancelled())
return false;
RoutingEngineResult resultGraph(routeEdges, m_adjacentEdges, m_pathSegments);
auto const res =
MakeTurnAnnotationPedestrian(resultGraph, *m_numMwmIds, m_vehicleType, cancellable,
routeGeometry, turns, streetNames, segments);
if (res != RouterResultCode::NoError)
return false;
CHECK_EQUAL(
routeGeometry.size(), pathSize,
("routeGeometry and path have different sizes. routeGeometry size:", routeGeometry.size(),
"path size:", pathSize, "segments size:", segments.size(), "routeEdges size:",
routeEdges.size(), "resultGraph.GetSegments() size:", resultGraph.GetSegments().size()));
return true;
return 0;
}
void PedestrianDirectionsEngine::FixupTurns(std::vector<geometry::PointWithAltitude> const & junctions,
Route::TTurns & turnsDir)
{
uint32_t turn_index = base::asserted_cast<uint32_t>(junctions.size() - 1);
turnsDir.emplace_back(TurnItem(turn_index, PedestrianDirection::ReachedYourDestination));
double const kMergeDistMeters = 15.0;
for (size_t idx = 0; idx < turnsDir.size();)
{
bool const prevStepNoTurn =
idx > 0 && turnsDir[idx - 1].m_pedestrianTurn == PedestrianDirection::GoStraight;
bool const needToTurn = turnsDir[idx].m_pedestrianTurn == PedestrianDirection::TurnLeft ||
turnsDir[idx].m_pedestrianTurn == PedestrianDirection::TurnRight;
// Merging turns which are closer to each other under some circumstance.
if (prevStepNoTurn && needToTurn &&
CalcRouteDistanceM(junctions, turnsDir[idx - 1].m_index, turnsDir[idx].m_index) <
kMergeDistMeters)
{
turnsDir.erase(turnsDir.begin() + idx - 1);
continue;
}
++idx;
}
#ifdef DEBUG
for (auto const & t : turnsDir)
LOG(LDEBUG, (GetTurnString(t.m_turn), ":", t.m_index, t.m_sourceName, "-",
t.m_targetName, "exit:", t.m_exitNum));
#endif
}
} // namespace routing

View file

@ -1,15 +1,9 @@
#pragma once
#include "routing/directions_engine.hpp"
#include "routing/directions_engine_helpers.hpp"
#include "routing/loaded_path_segment.hpp"
#include "routing/routing_result_graph.hpp"
#include "routing/turn_candidate.hpp"
#include "routing_common/num_mwm_id.hpp"
#include "geometry/point_with_altitude.hpp"
#include <memory>
#include <vector>
@ -20,11 +14,11 @@ class PedestrianDirectionsEngine : public DirectionsEngine
public:
PedestrianDirectionsEngine(MwmDataSource & dataSource, std::shared_ptr<NumMwmIds> numMwmIds);
// DirectionsEngine override:
bool Generate(IndexRoadGraph const & graph, std::vector<geometry::PointWithAltitude> const & path,
base::Cancellable const & cancellable, Route::TTurns & turns,
Route::TStreets & streetNames,
std::vector<geometry::PointWithAltitude> & routeGeometry,
std::vector<Segment> & segments) override;
protected:
virtual size_t GetTurnDirection(turns::IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
RoutingSettings const & vehicleSettings, turns::TurnItem & turn);
virtual void FixupTurns(std::vector<geometry::PointWithAltitude> const & junctions,
Route::TTurns & turnsDir);
};
} // namespace routing

View file

@ -182,9 +182,11 @@ UNIT_TEST(TurnsNearAltufievskoeShosseLongFakeSegmentTest)
integration::TestTurnCount(route, 3 /* expectedTurnCount */);
/// @todo Problem with outgoingTurns from RoutingEngineResult::GetPossibleTurns at (turn_m_index == 3)
/// For some reason for both of outgoingTurns angles are 0, but it is expected to be -90 and +90.
/// But this does not prevent from proper directions.
// Complicated case.
// RoutingEngineResult::GetPossibleTurns at (turn_m_index == 3)
// return nodes with isCandidatesAngleValid and 2 candidates with m_angle == 0
// In fact they are -90 and +90, but we don't know it.
// But this should not prevent from proper directions.
integration::GetNthTurn(route, 0).TestValid().TestDirection(CarDirection::TurnRight);
integration::GetNthTurn(route, 1).TestValid().TestDirection(CarDirection::TurnLeft);
integration::GetNthTurn(route, 2).TestValid().TestDirection(CarDirection::TurnRight);

View file

@ -387,7 +387,7 @@ UNIT_TEST(CrossMwmRussiaPStaiToBelarusDrazdy)
mercator::FromLatLon(55.01437, 30.8858), 4835.76);
}
UNIT_TEST(RussiaZgradPanfilovskyUndergroundCrossing)
UNIT_TEST(Russia_ZgradPanfilovskyUndergroundCrossing_TurnTest)
{
TRouteResult const routeResult =
integration::CalculateRoute(integration::GetVehicleComponents(VehicleType::Pedestrian),
@ -398,6 +398,8 @@ UNIT_TEST(RussiaZgradPanfilovskyUndergroundCrossing)
RouterResultCode const result = routeResult.second;
TEST_EQUAL(result, RouterResultCode::NoError, ());
integration::TestRouteLength(route, 151.0);
std::vector<turns::TurnItem> t;
route.GetTurnsForTesting(t);
TEST_EQUAL(t.size(), 3, ());
@ -407,7 +409,7 @@ UNIT_TEST(RussiaZgradPanfilovskyUndergroundCrossing)
TEST_EQUAL(t[2].m_pedestrianTurn, PedestrianDirection::ReachedYourDestination, ());
}
UNIT_TEST(RussiaMoscowHydroprojectBridgeCrossing)
UNIT_TEST(Russia_Moscow_HydroprojectBridgeCrossing_TurnTest)
{
TRouteResult const routeResult =
integration::CalculateRoute(integration::GetVehicleComponents(VehicleType::Pedestrian),
@ -418,6 +420,8 @@ UNIT_TEST(RussiaMoscowHydroprojectBridgeCrossing)
RouterResultCode const result = routeResult.second;
TEST_EQUAL(result, RouterResultCode::NoError, ());
integration::TestRouteLength(route, 334.0);
std::vector<turns::TurnItem> t;
route.GetTurnsForTesting(t);
TEST_EQUAL(t.size(), 5, ());
@ -429,7 +433,7 @@ UNIT_TEST(RussiaMoscowHydroprojectBridgeCrossing)
TEST_EQUAL(t[4].m_pedestrianTurn, PedestrianDirection::ReachedYourDestination, ());
}
UNIT_TEST(BelarusMinskRenaissanceHotelUndergroundCross)
UNIT_TEST(Belarus_Minsk_RenaissanceHotelUndergroundCross_TurnTest)
{
TRouteResult const routeResult =
integration::CalculateRoute(integration::GetVehicleComponents(VehicleType::Pedestrian),
@ -440,6 +444,8 @@ UNIT_TEST(BelarusMinskRenaissanceHotelUndergroundCross)
RouterResultCode const result = routeResult.second;
TEST_EQUAL(result, RouterResultCode::NoError, ());
integration::TestRouteLength(route, 127.0);
std::vector<turns::TurnItem> t;
route.GetTurnsForTesting(t);
TEST_EQUAL(t.size(), 5, ());
@ -467,7 +473,7 @@ UNIT_TEST(MoscowChistiePrudiSelectPointsInConnectedGraph)
mercator::FromLatLon(55.76593, 37.63893), 134.02);
}
UNIT_TEST(RussiaMoscowSevTushinoParkPedestrianOnePointTurnTest)
UNIT_TEST(Russia_Moscow_SevTushinoParkPedestrianOnePoint_TurnTest)
{
m2::PointD const point = mercator::FromLatLon(55.8719, 37.4464);
TRouteResult const routeResult = integration::CalculateRoute(
@ -476,8 +482,10 @@ UNIT_TEST(RussiaMoscowSevTushinoParkPedestrianOnePointTurnTest)
Route const & route = *routeResult.first;
RouterResultCode const result = routeResult.second;
TEST_EQUAL(result, RouterResultCode::NoError, ());
integration::TestTurnCount(route, 0 /* expectedTurnCount */);
integration::TestRouteLength(route, 0.0);
integration::TestTurnCount(route, 0 /* expectedTurnCount */);
}
UNIT_TEST(MoscowKashirskoe16ToVorobeviGori)
@ -553,7 +561,7 @@ UNIT_TEST(RussiaSmolenskAriaFeatureCrossingBorderWithFord)
mercator::FromLatLon(55.01867, 30.91285), 298.6);
}
UNIT_TEST(NoTurnOnForkingRoad)
UNIT_TEST(NoTurnOnForkingRoad_TurnTest)
{
TRouteResult const routeResult = integration::CalculateRoute(
integration::GetVehicleComponents(VehicleType::Pedestrian),
@ -563,6 +571,8 @@ UNIT_TEST(NoTurnOnForkingRoad)
RouterResultCode const result = routeResult.second;
TEST_EQUAL(result, RouterResultCode::NoError, ());
integration::TestRouteLength(route, 51.2);
std::vector<turns::TurnItem> t;
route.GetTurnsForTesting(t);
TEST_EQUAL(t.size(), 2, ());
@ -570,7 +580,7 @@ UNIT_TEST(NoTurnOnForkingRoad)
TEST_EQUAL(t[0].m_pedestrianTurn, PedestrianDirection::TurnLeft, ());
}
UNIT_TEST(NoTurnOnForkingRoad2)
UNIT_TEST(NoTurnOnForkingRoad2_TurnTest)
{
TRouteResult const routeResult = integration::CalculateRoute(
integration::GetVehicleComponents(VehicleType::Pedestrian),
@ -580,6 +590,8 @@ UNIT_TEST(NoTurnOnForkingRoad2)
RouterResultCode const result = routeResult.second;
TEST_EQUAL(result, RouterResultCode::NoError, ());
integration::TestRouteLength(route, 300.0);
// Unfortunatelly, we don't have SlightRight for pedestrians, but current turns are OK.
// https://www.openstreetmap.org/directions?engine=graphhopper_foot&route=55.68336%2C37.49492%3B55.68488%2C37.49789
std::vector<turns::TurnItem> t;

View file

@ -6,6 +6,7 @@
#include "routing/turns.hpp"
#include "routing/turns_generator_utils.hpp"
#include "routing/turns_generator.hpp"
#include "routing/car_directions.hpp"
#include "indexer/ftypes_matcher.hpp"
@ -178,10 +179,9 @@ UNIT_TEST(TestFixupTurns)
// is used for initialization of vector<TurnItem> below.
Route::TTurns turnsDir1 = {{0, CarDirection::EnterRoundAbout},
{1, CarDirection::StayOnRoundAbout},
{2, CarDirection::LeaveRoundAbout},
{3, CarDirection::ReachedYourDestination}};
{2, CarDirection::LeaveRoundAbout}};
FixupTurns(pointsMerc1, turnsDir1);
FixupCarTurns(pointsMerc1, turnsDir1);
Route::TTurns const expectedTurnDir1 = {{0, CarDirection::EnterRoundAbout, 2},
{2, CarDirection::LeaveRoundAbout, 2},
{3, CarDirection::ReachedYourDestination}};
@ -194,10 +194,9 @@ UNIT_TEST(TestFixupTurns)
{{kSquareNearZero.maxX(), kSquareNearZero.maxY()}, geometry::kDefaultAltitudeMeters},
};
Route::TTurns turnsDir2 = {{0, CarDirection::GoStraight},
{1, CarDirection::TurnLeft},
{2, CarDirection::ReachedYourDestination}};
{1, CarDirection::TurnLeft}};
FixupTurns(pointsMerc2, turnsDir2);
FixupCarTurns(pointsMerc2, turnsDir2);
Route::TTurns const expectedTurnDir2 = {{1, CarDirection::TurnLeft},
{2, CarDirection::ReachedYourDestination}};
TEST_EQUAL(turnsDir2, expectedTurnDir2, ());
@ -208,10 +207,9 @@ UNIT_TEST(TestFixupTurns)
{{kSquareNearZero.minX(), kSquareNearZero.maxY()}, geometry::kDefaultAltitudeMeters},
{{kSquareNearZero.maxX(), kSquareNearZero.maxY()}, geometry::kDefaultAltitudeMeters},
};
Route::TTurns turnsDir3 = {{1, CarDirection::TurnRight},
{2, CarDirection::ReachedYourDestination}};
Route::TTurns turnsDir3 = {{1, CarDirection::TurnRight}};
FixupTurns(pointsMerc3, turnsDir3);
FixupCarTurns(pointsMerc3, turnsDir3);
Route::TTurns const expectedTurnDir3 = {{1, CarDirection::TurnRight},
{2, CarDirection::ReachedYourDestination}};
TEST_EQUAL(turnsDir3, expectedTurnDir3, ());
@ -283,12 +281,12 @@ UNIT_TEST(TestGetRoundaboutDirection)
// The signature of GetRoundaboutDirection function is
// GetRoundaboutDirection(bool isIngoingEdgeRoundabout, bool isOutgoingEdgeRoundabout,
// bool isMultiTurnJunction, bool keepTurnByHighwayClass)
TEST_EQUAL(GetRoundaboutDirection(true, true, true, true), CarDirection::StayOnRoundAbout, ());
TEST_EQUAL(GetRoundaboutDirection(true, true, true, false), CarDirection::None, ());
TEST_EQUAL(GetRoundaboutDirection(true, true, false, true), CarDirection::None, ());
TEST_EQUAL(GetRoundaboutDirection(true, true, false, false), CarDirection::None, ());
TEST_EQUAL(GetRoundaboutDirection(false, true, false, true), CarDirection::EnterRoundAbout, ());
TEST_EQUAL(GetRoundaboutDirection(true, false, false, false), CarDirection::LeaveRoundAbout, ());
TEST_EQUAL(GetRoundaboutDirectionBasic(true, true, true, true), CarDirection::StayOnRoundAbout, ());
TEST_EQUAL(GetRoundaboutDirectionBasic(true, true, true, false), CarDirection::None, ());
TEST_EQUAL(GetRoundaboutDirectionBasic(true, true, false, true), CarDirection::None, ());
TEST_EQUAL(GetRoundaboutDirectionBasic(true, true, false, false), CarDirection::None, ());
TEST_EQUAL(GetRoundaboutDirectionBasic(false, true, false, true), CarDirection::EnterRoundAbout, ());
TEST_EQUAL(GetRoundaboutDirectionBasic(true, false, false, false), CarDirection::LeaveRoundAbout, ());
}
UNIT_TEST(TestInvertDirection)

View file

@ -1,20 +1,12 @@
#include "routing/turns_generator.hpp"
#include "routing/turns_generator_utils.hpp"
#include "routing/turns_generator_utils.hpp"
#include "routing/router.hpp"
#include "platform/measurement_utils.hpp"
#include "indexer/ftypes_matcher.hpp"
#include "geometry/angles.hpp"
#include "base/checked_cast.hpp"
#include "base/stl_helpers.hpp"
#include <cmath>
#include <sstream>
#include <numeric>
namespace routing
{
namespace turns
@ -22,85 +14,6 @@ namespace turns
using namespace std;
using namespace ftypes;
// Angles in degrees for finding route segments with no actual forks.
double constexpr kMaxForwardAngleCandidates = 95.0;
double constexpr kMaxForwardAngleActual = 60.0;
// Min difference of route and alternative turn abs angles in degrees
// to ignore alternative turn (when route direction is GoStraight).
double constexpr kMinAbsAngleDiffForStraightRoute = 25.0;
// Min difference of route and alternative turn abs angles in degrees
// to ignore alternative turn (when route direction is bigger and GoStraight).
double constexpr kMinAbsAngleDiffForBigStraightRoute = 5;
// Min difference of route and alternative turn abs angles in degrees
// to ignore this alternative candidate (when alternative road is the same or smaller).
double constexpr kMinAbsAngleDiffForSameOrSmallerRoad = 35.0;
// Min difference between HighwayClasses of the route segment and alternative turn segment
// to ignore this alternative candidate.
int constexpr kMinHighwayClassDiff = -2;
// Min difference between HighwayClasses of the route segment and alternative turn segment
// to ignore this alternative candidate (when alternative road is service).
int constexpr kMinHighwayClassDiffForService = -1;
/// \brief Return |CarDirection::ExitHighwayToRight| or |CarDirection::ExitHighwayToLeft|
/// or return |CarDirection::None| if no exit is detected.
/// \note The function makes a decision about turn based on geometry of the route and turn
/// candidates, so it works correctly for both left and right hand traffic.
CarDirection TryToGetExitDirection(TurnCandidates const & possibleTurns, TurnInfo const & turnInfo,
Segment const & firstOutgoingSeg, CarDirection const intermediateDirection)
{
if (!possibleTurns.isCandidatesAngleValid)
return CarDirection::None;
if (!IsHighway(turnInfo.m_ingoing->m_highwayClass, turnInfo.m_ingoing->m_isLink))
return CarDirection::None;
if (!turnInfo.m_outgoing->m_isLink && !(IsSmallRoad(turnInfo.m_outgoing->m_highwayClass) && IsGoStraightOrSlightTurn(intermediateDirection)))
return CarDirection::None;
// At this point it is known that the route goes form a highway to a link road or to a small road
// which has a slight angle with the highway.
// Considering cases when the route goes from a highway to a link or a small road.
// Checking all turn candidates (sorted by their angles) and looking for the road which is a
// continuation of the ingoing segment. If the continuation is on the right hand of the route
// it's an exit to the left. If the continuation is on the left hand of the route
// it's an exit to the right.
// Note. The angle which is used for sorting turn candidates in |possibleTurns.candidates|
// is a counterclockwise angle between the ingoing route edge and corresponding candidate.
// For left turns the angle is less than zero and for right ones it is more than zero.
bool isCandidateBeforeOutgoing = true;
bool isHighwayCandidateBeforeOutgoing = true;
size_t highwayCandidateNumber = 0;
for (auto const & c : possibleTurns.candidates)
{
if (c.m_segment == firstOutgoingSeg)
{
isCandidateBeforeOutgoing = false;
continue;
}
if (IsHighway(c.m_highwayClass, c.m_isLink))
{
++highwayCandidateNumber;
if (highwayCandidateNumber >= 2)
return CarDirection::None; // There are two or more highway candidates from the junction.
isHighwayCandidateBeforeOutgoing = isCandidateBeforeOutgoing;
}
}
if (highwayCandidateNumber == 1)
{
return isHighwayCandidateBeforeOutgoing ? CarDirection::ExitHighwayToRight
: CarDirection::ExitHighwayToLeft;
}
return CarDirection::None;
}
/// * \returns true when
/// * - the route leads from one big road to another one;
/// * - and the other possible turns lead to small roads;
@ -144,153 +57,6 @@ bool CanDiscardTurnByHighwayClass(std::vector<TurnCandidate> const & turnCandida
return true;
}
/// * \returns true when
/// * - the route leads from one big road to another one;
/// * - and the other possible turns lead to small roads or these turns too sharp.
/// * Returns false otherwise.
/// \param routeDirection is route direction.
/// \param routeAngle is route angle.
/// \param turnCandidates is all possible ways out from a junction except uturn.
/// \param turnInfo is information about ingoing and outgoing segments of the route.
bool CanDiscardTurnByHighwayClassOrAngles(CarDirection const routeDirection,
double const routeAngle,
std::vector<TurnCandidate> const & turnCandidates,
TurnInfo const & turnInfo,
NumMwmIds const & numMwmIds)
{
if (!IsGoStraightOrSlightTurn(routeDirection))
return false;
if (turnCandidates.size() < 2)
return true;
HighwayClass outgoingRouteRoadClass = turnInfo.m_outgoing->m_highwayClass;
HighwayClass ingoingRouteRoadClass = turnInfo.m_ingoing->m_highwayClass;
// The turn should be kept if there's no any information about feature id of outgoing segment
// just to be on the safe side. It may happen in case of outgoing segment is a finish segment.
Segment firstOutgoingSegment;
if (!turnInfo.m_outgoing->m_segmentRange.GetFirstSegment(numMwmIds, firstOutgoingSegment))
return false;
for (auto const & t : turnCandidates)
{
// Let's consider all outgoing segments except for route outgoing segment.
if (t.m_segment == firstOutgoingSegment)
continue;
// If route goes from non-link to link and there is not too sharp candidate then turn can't be discarded.
if (!turnInfo.m_ingoing->m_isLink && turnInfo.m_outgoing->m_isLink && abs(t.m_angle) < abs(routeAngle) + 70)
return false;
HighwayClass candidateRoadClass = t.m_highwayClass;
// If outgoing route road is significantly larger than candidate, the candidate can be ignored.
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) <= kMinHighwayClassDiff)
continue;
// If outgoing route's road is significantly larger than candidate's service road, the candidate can be ignored.
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) <= kMinHighwayClassDiffForService && candidateRoadClass == HighwayClass::Service)
continue;
// If igngoing and outgoing edges are not links
// and outgoing route road is the same or large than ingoing
// then candidate-link can be ignored.
if (!turnInfo.m_ingoing->m_isLink && !turnInfo.m_outgoing->m_isLink &&
CalcDiffRoadClasses(outgoingRouteRoadClass, ingoingRouteRoadClass) <= 0 &&
t.m_isLink)
continue;
// If alternative cadidate's road size is the same or smaller
// and it's angle is sharp enough compared to the route it can be ignored.
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) <= 0 &&
abs(t.m_angle) > abs(routeAngle) + kMinAbsAngleDiffForSameOrSmallerRoad)
continue;
if (routeDirection == CarDirection::GoStraight)
{
// If alternative cadidate's road size is smaller
// and it's angle is not very close to the route's one - it can be ignored.
if (CalcDiffRoadClasses(outgoingRouteRoadClass, candidateRoadClass) < 0 &&
abs(t.m_angle) > abs(routeAngle) + kMinAbsAngleDiffForBigStraightRoute)
continue;
// If outgoing route road is the same or large than ingoing
// and candidate's angle is sharp enough compared to the route it can be ignored.
if (CalcDiffRoadClasses(outgoingRouteRoadClass, ingoingRouteRoadClass) <= 0 &&
abs(t.m_angle) > abs(routeAngle) + kMinAbsAngleDiffForStraightRoute)
continue;
}
return false;
}
return true;
}
/*!
* \brief Returns false when other possible turns leads to service roads;
*/
bool KeepRoundaboutTurnByHighwayClass(TurnCandidates const & possibleTurns,
TurnInfo const & turnInfo, NumMwmIds const & numMwmIds)
{
Segment firstOutgoingSegment;
bool const validFirstOutgoingSeg = turnInfo.m_outgoing->m_segmentRange.GetFirstSegment(numMwmIds, firstOutgoingSegment);
for (auto const & t : possibleTurns.candidates)
{
if (!validFirstOutgoingSeg || t.m_segment == firstOutgoingSegment)
continue;
if (t.m_highwayClass != HighwayClass::Service)
return true;
}
return false;
}
bool FixupLaneSet(CarDirection turn, std::vector<SingleLaneInfo> & lanes,
function<bool(LaneWay l, CarDirection t)> checker)
{
bool isLaneConformed = false;
// There are two nested loops below. (There is a for-loop in checker.)
// But the number of calls of the body of inner one (in checker) is relatively small.
// Less than 10 in most cases.
for (auto & singleLane : lanes)
{
for (LaneWay laneWay : singleLane.m_lane)
{
if (checker(laneWay, turn))
{
singleLane.m_isRecommended = true;
isLaneConformed = true;
break;
}
}
}
return isLaneConformed;
}
/*!
* \brief Returns ingoing point or outgoing point for turns.
* These points belong to the route but they often are not neighbor of junction point.
* To calculate the resulting point the function implements the following steps:
* - going from junction point along route path according to the direction which is set in GetPointIndex().
* - until one of following conditions is fulfilled:
* - more than |maxPointsCount| points are passed (returns the maxPointsCount-th point);
* - the length of passed parts of segment exceeds maxDistMeters;
* (returns the next point after the event)
* - an important bifurcation point is reached in case of outgoing point is looked up (forward == true).
* \param result information about the route. |result.GetSegments()| is composed of LoadedPathSegment.
* Each LoadedPathSegment is composed of several Segments. The sequence of Segments belongs to
* single feature and does not split by other features.
* \param outgoingSegmentIndex index in |segments|. Junction point noticed above is the first point
* of |outgoingSegmentIndex| segment in |result.GetSegments()|.
* \param maxPointsCount maximum number between the returned point and junction point.
* \param maxDistMeters maximum distance between the returned point and junction point.
* \param forward is direction of moving along the route to calculate the returned point.
* If forward == true the direction is to route finish. If forward == false the direction is to route start.
* \return an ingoing or outgoing point for a turn calculation.
*/
m2::PointD GetPointForTurn(IRoutingResult const & result, size_t outgoingSegmentIndex,
NumMwmIds const & numMwmIds, size_t const maxPointsCount,
double const maxDistMeters, bool const forward)
@ -431,24 +197,6 @@ bool GetPrevInSegmentRoutePoint(IRoutingResult const & result, RoutePointIndex c
return true;
}
/*!
* \brief Corrects |turn.m_turn| if |turn.m_turn == CarDirection::GoStraight|.
* If the other way is not sharp enough, turn.m_turn is set to |turnToSet|.
*/
void CorrectGoStraight(TurnCandidate const & notRouteCandidate, double const routeAngle, CarDirection const & turnToSet,
TurnItem & turn)
{
if (turn.m_turn != CarDirection::GoStraight)
return;
// Correct turn if alternative cadidate's angle is not sharp enough compared to the route.
if (abs(notRouteCandidate.m_angle) < abs(routeAngle) + kMinAbsAngleDiffForStraightRoute)
{
LOG(LDEBUG, ("Turn: ", turn.m_index, " GoStraight correction."));
turn.m_turn = turnToSet;
}
}
bool GetNextRoutePointIndex(IRoutingResult const & result, RoutePointIndex const & index,
NumMwmIds const & numMwmIds, bool const forward,
RoutePointIndex & nextIndex)
@ -469,312 +217,6 @@ bool GetNextRoutePointIndex(IRoutingResult const & result, RoutePointIndex const
return true;
}
RouterResultCode MakeTurnAnnotation(IRoutingResult const & result, NumMwmIds const & numMwmIds,
VehicleType const & vehicleType,
base::Cancellable const & cancellable,
std::vector<geometry::PointWithAltitude> & junctions,
Route::TTurns & turnsDir, Route::TStreets & streets,
std::vector<Segment> & segments)
{
LOG(LDEBUG, ("Shortest path length:", result.GetPathLength()));
if (cancellable.IsCancelled())
return RouterResultCode::Cancelled;
// Annotate turns.
size_t skipTurnSegments = 0;
auto const & loadedSegments = result.GetSegments();
segments.reserve(loadedSegments.size());
RoutingSettings const vehicleSettings = GetRoutingSettings(vehicleType);
for (auto loadedSegmentIt = loadedSegments.cbegin(); loadedSegmentIt != loadedSegments.cend();
++loadedSegmentIt)
{
CHECK(loadedSegmentIt->IsValid(), ());
// Street names. I put empty names too, to avoid freezing old street name while riding on
// unnamed street.
streets.emplace_back(max(junctions.size(), static_cast<size_t>(1)) - 1, loadedSegmentIt->m_name);
// Turns information.
if (!junctions.empty() && skipTurnSegments == 0)
{
TurnItem turnItem;
turnItem.m_index = static_cast<uint32_t>(junctions.size() - 1);
auto const outgoingSegmentDist = distance(loadedSegments.begin(), loadedSegmentIt);
CHECK_GREATER(outgoingSegmentDist, 0, ());
auto const outgoingSegmentIndex = static_cast<size_t>(outgoingSegmentDist);
skipTurnSegments = CheckUTurnOnRoute(result, outgoingSegmentIndex, numMwmIds, vehicleSettings, turnItem);
if (turnItem.m_turn == CarDirection::None)
GetTurnDirection(result, outgoingSegmentIndex, numMwmIds, vehicleSettings, turnItem);
// Lane information.
if (turnItem.m_turn != CarDirection::None)
{
auto const & ingoingSegment = loadedSegments[outgoingSegmentIndex - 1];
turnItem.m_lanes = ingoingSegment.m_lanes;
turnsDir.push_back(move(turnItem));
}
}
if (skipTurnSegments > 0)
--skipTurnSegments;
// Path geometry.
CHECK_GREATER_OR_EQUAL(loadedSegmentIt->m_path.size(), 2, ());
// Note. Every LoadedPathSegment in TUnpackedPathSegments contains LoadedPathSegment::m_path
// of several Junctions. Last PointWithAltitude in a LoadedPathSegment::m_path is equal to first
// junction in next LoadedPathSegment::m_path in vector TUnpackedPathSegments:
// *---*---*---*---* *---* *---*---*---*
// *---*---* *---*---*---*
// To prevent having repetitions in |junctions| list it's necessary to take the first point only
// from the first item of |loadedSegments|. The beginning should be ignored for the rest
// |m_path|.
junctions.insert(junctions.end(), loadedSegmentIt == loadedSegments.cbegin()
? loadedSegmentIt->m_path.cbegin()
: loadedSegmentIt->m_path.cbegin() + 1,
loadedSegmentIt->m_path.cend());
segments.insert(segments.end(), loadedSegmentIt->m_segments.cbegin(),
loadedSegmentIt->m_segments.cend());
}
// Path found. Points will be replaced by start and end edges junctions.
if (junctions.size() == 1)
junctions.push_back(junctions.front());
if (junctions.size() < 2)
return RouterResultCode::RouteNotFound;
junctions.front() = result.GetStartPoint();
junctions.back() = result.GetEndPoint();
turnsDir.emplace_back(TurnItem(base::asserted_cast<uint32_t>(junctions.size()) - 1,
CarDirection::ReachedYourDestination));
FixupTurns(junctions, turnsDir);
#ifdef DEBUG
for (auto const & t : turnsDir)
{
LOG(LDEBUG, (GetTurnString(t.m_turn), ":", t.m_index, t.m_sourceName, "-",
t.m_targetName, "exit:", t.m_exitNum));
}
#endif
return RouterResultCode::NoError;
}
RouterResultCode MakeTurnAnnotationPedestrian(
IRoutingResult const & result, NumMwmIds const & numMwmIds, VehicleType const & vehicleType,
base::Cancellable const & cancellable, std::vector<geometry::PointWithAltitude> & junctions,
Route::TTurns & turnsDir, Route::TStreets & streets, std::vector<Segment> & segments)
{
LOG(LDEBUG, ("Shortest path length:", result.GetPathLength()));
if (cancellable.IsCancelled())
return RouterResultCode::Cancelled;
size_t skipTurnSegments = 0;
auto const & loadedSegments = result.GetSegments();
segments.reserve(loadedSegments.size());
RoutingSettings const vehicleSettings = GetRoutingSettings(vehicleType);
for (auto loadedSegmentIt = loadedSegments.cbegin(); loadedSegmentIt != loadedSegments.cend();
++loadedSegmentIt)
{
CHECK(loadedSegmentIt->IsValid(), ());
// Street names contain empty names too for avoiding of freezing of old street name while
// moving along unnamed street.
streets.emplace_back(max(junctions.size(), static_cast<size_t>(1)) - 1,
loadedSegmentIt->m_name);
// Turns information.
if (!junctions.empty() && skipTurnSegments == 0)
{
auto const outgoingSegmentDist = distance(loadedSegments.begin(), loadedSegmentIt);
CHECK_GREATER(outgoingSegmentDist, 0, ());
auto const outgoingSegmentIndex = static_cast<size_t>(outgoingSegmentDist);
TurnItem turnItem;
turnItem.m_index = static_cast<uint32_t>(junctions.size() - 1);
GetTurnDirectionPedestrian(result, outgoingSegmentIndex, numMwmIds, vehicleSettings,
turnItem);
if (turnItem.m_pedestrianTurn != PedestrianDirection::None)
turnsDir.push_back(move(turnItem));
}
if (skipTurnSegments > 0)
--skipTurnSegments;
CHECK_GREATER_OR_EQUAL(loadedSegmentIt->m_path.size(), 2, ());
junctions.insert(junctions.end(),
loadedSegmentIt == loadedSegments.cbegin()
? loadedSegmentIt->m_path.cbegin()
: loadedSegmentIt->m_path.cbegin() + 1,
loadedSegmentIt->m_path.cend());
segments.insert(segments.end(), loadedSegmentIt->m_segments.cbegin(),
loadedSegmentIt->m_segments.cend());
}
if (junctions.size() == 1)
junctions.push_back(junctions.front());
if (junctions.size() < 2)
return RouterResultCode::RouteNotFound;
junctions.front() = result.GetStartPoint();
junctions.back() = result.GetEndPoint();
turnsDir.emplace_back(TurnItem(base::asserted_cast<uint32_t>(junctions.size()) - 1,
PedestrianDirection::ReachedYourDestination));
FixupTurnsPedestrian(junctions, turnsDir);
#ifdef DEBUG
for (auto t : turnsDir)
LOG(LDEBUG, (t.m_pedestrianTurn, ":", t.m_index, t.m_sourceName, "-", t.m_targetName));
#endif
return RouterResultCode::NoError;
}
void FixupTurns(std::vector<geometry::PointWithAltitude> const & junctions, Route::TTurns & turnsDir)
{
double const kMergeDistMeters = 15.0;
// For turns that are not EnterRoundAbout/ExitRoundAbout exitNum is always equal to zero.
// If a turn is EnterRoundAbout exitNum is a number of turns between two junctions:
// (1) the route enters to the roundabout;
// (2) the route leaves the roundabout;
uint32_t exitNum = 0;
TurnItem * currentEnterRoundAbout = nullptr;
for (size_t idx = 0; idx < turnsDir.size(); )
{
TurnItem & t = turnsDir[idx];
if (currentEnterRoundAbout && t.m_turn != CarDirection::StayOnRoundAbout && t.m_turn != CarDirection::LeaveRoundAbout)
{
ASSERT(false, ("Only StayOnRoundAbout or LeaveRoundAbout are expected after EnterRoundAbout."));
exitNum = 0;
currentEnterRoundAbout = nullptr;
}
else if (t.m_turn == CarDirection::EnterRoundAbout)
{
ASSERT(!currentEnterRoundAbout, ("It's not expected to find new EnterRoundAbout until previous EnterRoundAbout was leaved."));
currentEnterRoundAbout = &t;
ASSERT(exitNum == 0, ("exitNum is reset at start and after LeaveRoundAbout."));
exitNum = 0;
}
else if (t.m_turn == CarDirection::StayOnRoundAbout)
{
++exitNum;
turnsDir.erase(turnsDir.begin() + idx);
continue;
}
else if (t.m_turn == CarDirection::LeaveRoundAbout)
{
// It's possible for car to be on roundabout without entering it
// if route calculation started at roundabout (e.g. if user made full turn on roundabout).
if (currentEnterRoundAbout)
currentEnterRoundAbout->m_exitNum = exitNum + 1;
t.m_exitNum = exitNum + 1; // For LeaveRoundAbout turn.
currentEnterRoundAbout = nullptr;
exitNum = 0;
}
// Merging turns which are closed to each other under some circumstance.
// distance(turnsDir[idx - 1].m_index, turnsDir[idx].m_index) < kMergeDistMeters
// means the distance in meters between the former turn (idx - 1)
// and the current turn (idx).
if (idx > 0 && IsStayOnRoad(turnsDir[idx - 1].m_turn) &&
IsLeftOrRightTurn(turnsDir[idx].m_turn) &&
CalcRouteDistanceM(junctions, turnsDir[idx - 1].m_index, turnsDir[idx].m_index) <
kMergeDistMeters)
{
turnsDir.erase(turnsDir.begin() + idx - 1);
continue;
}
++idx;
}
SelectRecommendedLanes(turnsDir);
}
void FixupTurnsPedestrian(std::vector<geometry::PointWithAltitude> const & junctions,
Route::TTurns & turnsDir)
{
double const kMergeDistMeters = 15.0;
for (size_t idx = 0; idx < turnsDir.size();)
{
bool const prevStepNoTurn =
idx > 0 && turnsDir[idx - 1].m_pedestrianTurn == PedestrianDirection::GoStraight;
bool const needToTurn = turnsDir[idx].m_pedestrianTurn == PedestrianDirection::TurnLeft ||
turnsDir[idx].m_pedestrianTurn == PedestrianDirection::TurnRight;
// Merging turns which are closer to each other under some circumstance.
if (prevStepNoTurn && needToTurn &&
CalcRouteDistanceM(junctions, turnsDir[idx - 1].m_index, turnsDir[idx].m_index) <
kMergeDistMeters)
{
turnsDir.erase(turnsDir.begin() + idx - 1);
continue;
}
++idx;
}
}
void SelectRecommendedLanes(Route::TTurns & turnsDir)
{
for (auto & t : turnsDir)
{
std::vector<SingleLaneInfo> & lanes = t.m_lanes;
if (lanes.empty())
continue;
CarDirection const turn = t.m_turn;
// Checking if threre are elements in lanes which correspond with the turn exactly.
// If so fixing up all the elements in lanes which correspond with the turn.
if (FixupLaneSet(turn, lanes, &IsLaneWayConformedTurnDirection))
continue;
// If not checking if there are elements in lanes which corresponds with the turn
// approximately. If so fixing up all these elements.
FixupLaneSet(turn, lanes, &IsLaneWayConformedTurnDirectionApproximately);
}
}
CarDirection GetRoundaboutDirection(bool isIngoingEdgeRoundabout, bool isOutgoingEdgeRoundabout,
bool isMultiTurnJunction, bool keepTurnByHighwayClass)
{
if (isIngoingEdgeRoundabout && isOutgoingEdgeRoundabout)
{
if (isMultiTurnJunction)
return keepTurnByHighwayClass ? CarDirection::StayOnRoundAbout : CarDirection::None;
return CarDirection::None;
}
if (!isIngoingEdgeRoundabout && isOutgoingEdgeRoundabout)
return CarDirection::EnterRoundAbout;
if (isIngoingEdgeRoundabout && !isOutgoingEdgeRoundabout)
return CarDirection::LeaveRoundAbout;
ASSERT(false, ());
return CarDirection::None;
}
CarDirection GetRoundaboutDirection(TurnInfo const & turnInfo, TurnCandidates const & nodes, NumMwmIds const & numMwmIds)
{
bool const keepTurnByHighwayClass = KeepRoundaboutTurnByHighwayClass(nodes, turnInfo, numMwmIds);
return GetRoundaboutDirection(turnInfo.m_ingoing->m_onRoundabout, turnInfo.m_outgoing->m_onRoundabout,
nodes.candidates.size() > 1, keepTurnByHighwayClass);
}
void RemoveUTurnCandidate(TurnInfo const & turnInfo, NumMwmIds const & numMwmIds, std::vector<TurnCandidate> & turnCandidates)
{
Segment lastIngoingSegment;
@ -789,13 +231,13 @@ void RemoveUTurnCandidate(TurnInfo const & turnInfo, NumMwmIds const & numMwmIds
/// \returns true if there is exactly 1 turn in |turnCandidates| with angle less then
/// |kMaxForwardAngleCandidates|.
bool HasSingleForwardTurn(TurnCandidates const & turnCandidates)
bool HasSingleForwardTurn(TurnCandidates const & turnCandidates, float maxForwardAngleCandidates)
{
bool foundForwardTurn = false;
for (auto const & turn : turnCandidates.candidates)
{
if (std::fabs(turn.m_angle) < kMaxForwardAngleCandidates)
if (std::fabs(turn.m_angle) < maxForwardAngleCandidates)
{
if (foundForwardTurn)
return false;
@ -807,8 +249,6 @@ bool HasSingleForwardTurn(TurnCandidates const & turnCandidates)
return foundForwardTurn;
}
/// \returns angle, wchis is calculated using several backward and forward segments
/// from junction to consider smooth turns and remove noise.
double CalcTurnAngle(IRoutingResult const & result,
size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
@ -828,25 +268,60 @@ double CalcTurnAngle(IRoutingResult const & result,
return base::RadToDeg(PiMinusTwoVectorsAngle(junctionPoint, ingoingPoint, outgoingPoint));
}
// It's possible that |firstOutgoingSeg| is not contained in |turnCandidates|.
// It may happened if |firstOutgoingSeg| and candidates in |turnCandidates| are from different mwms.
// Let's identify it in turnCandidates by angle and update according turnCandidate.
void CorrectCandidatesSegmentByOutgoing(TurnInfo const & turnInfo,
Segment const & firstOutgoingSeg,
std::vector<TurnCandidate> & candidates)
void CorrectCandidatesSegmentByOutgoing(TurnInfo const & turnInfo, Segment const & firstOutgoingSeg,
TurnCandidates & nodes)
{
double const turnAngle = CalcOneSegmentTurnAngle(turnInfo);
auto IsFirstOutgoingSeg = [&firstOutgoingSeg](TurnCandidate const & turnCandidate) { return turnCandidate.m_segment == firstOutgoingSeg; };
if (find_if(candidates.begin(), candidates.end(), IsFirstOutgoingSeg) == candidates.end())
auto & candidates = nodes.candidates;
auto it = find_if(candidates.begin(), candidates.end(), IsFirstOutgoingSeg);
if (it == candidates.end())
{
double const turnAngle = CalcOneSegmentTurnAngle(turnInfo);
auto DoesAngleMatch = [&turnAngle](TurnCandidate const & turnCandidate) { return base::AlmostEqualAbs(turnCandidate.m_angle, turnAngle, 0.001); };
// firstOutgoingSeg not found. Try to match by angle.
auto DoesAngleMatch = [&turnAngle](TurnCandidate const & candidate)
{
return base::AlmostEqualAbs(candidate.m_angle, turnAngle, 0.001) || abs(candidate.m_angle) + abs(turnAngle) > 359.999;
};
auto it = find_if(candidates.begin(), candidates.end(), DoesAngleMatch);
if (it != candidates.end())
{
// Match by angle. Update candidate's segment.
ASSERT(it->m_segment.GetMwmId() != firstOutgoingSeg.GetMwmId(), ());
ASSERT(it->m_segment.GetSegmentIdx() == firstOutgoingSeg.GetSegmentIdx() && it->m_segment.IsForward() == firstOutgoingSeg.IsForward(), ());
ASSERT(it->m_segment.GetSegmentIdx() == firstOutgoingSeg.GetSegmentIdx(), ());
ASSERT(it->m_segment.IsForward() == firstOutgoingSeg.IsForward(), ());
it->m_segment = firstOutgoingSeg;
}
else if (nodes.isCandidatesAngleValid)
ASSERT(false, ("Can't match any candidate with firstOutgoingSegment but isCandidatesAngleValid == true."));
else
{
LOG(LWARNING, ("Can't match any candidate with firstOutgoingSegment and isCandidatesAngleValid == false"));
if (candidates.size() == 1)
{
ASSERT(candidates.front().m_segment.GetMwmId() != firstOutgoingSeg.GetMwmId(), ());
ASSERT(candidates.front().m_segment.GetSegmentIdx() == firstOutgoingSeg.GetSegmentIdx(), ());
ASSERT(candidates.front().m_segment.IsForward() == firstOutgoingSeg.IsForward(), ());
candidates.front().m_segment = firstOutgoingSeg;
candidates.front().m_angle = turnAngle;
nodes.isCandidatesAngleValid = true;
LOG(LWARNING, ("but since candidates.size() == 1, this was fixed."));
}
else
LOG(LWARNING, ("and since candidates.size() > 1, this can't be fixed."));
}
}
else // firstOutgoingSeg is found.
{
if (nodes.isCandidatesAngleValid)
ASSERT((base::AlmostEqualAbs(it->m_angle, turnAngle, 0.001) || abs(it->m_angle) + abs(turnAngle) > 359.999), ());
else
{
it->m_angle = turnAngle;
if (candidates.size() == 1)
nodes.isCandidatesAngleValid = true;
else
LOG(LWARNING, ("isCandidatesAngleValid == false, and this can't be fixed."));
}
}
}
@ -892,290 +367,5 @@ bool GetTurnInfo(IRoutingResult const & result, size_t const outgoingSegmentInde
return true;
}
// If the route goes along the rightmost or the leftmost way among available ones:
// 1. RightmostDirection or LeftmostDirection is selected
// 2. If the turn direction is |CarDirection::GoStraight|
// and there's another not sharp enough turn
// GoStraight is corrected to TurnSlightRight/TurnSlightLeft
// to avoid ambiguity for GoStraight direction: 2 or more almost straight turns.
void CorrectRightmostAndLeftmost(std::vector<TurnCandidate> const & turnCandidates,
Segment const & firstOutgoingSeg, double const turnAngle,
TurnItem & turn)
{
// turnCandidates are sorted by angle from leftmost to rightmost.
// Normally no duplicates should be found. But if they are present we can't identify the leftmost/rightmost by order.
if (adjacent_find(turnCandidates.begin(), turnCandidates.end(), base::EqualsBy(&TurnCandidate::m_angle)) != turnCandidates.end())
{
LOG(LWARNING, ("nodes.candidates are not expected to have same m_angle."));
return;
}
double constexpr kMaxAbsAngleConsideredLeftOrRightMost = 90;
// Go from left to right to findout if the route goes through the leftmost candidate and fixes can be applied.
// Other candidates which are sharper than kMaxAbsAngleConsideredLeftOrRightMost are ignored.
for (auto candidate = turnCandidates.begin(); candidate != turnCandidates.end(); ++candidate)
{
if (candidate->m_segment == firstOutgoingSeg && candidate + 1 != turnCandidates.end())
{
// The route goes along the leftmost candidate.
turn.m_turn = LeftmostDirection(turnAngle);
if (IntermediateDirection(turnAngle) != turn.m_turn)
LOG(LDEBUG, ("Turn: ", turn.m_index, " LeftmostDirection correction."));
// Compare with the next candidate to the right.
CorrectGoStraight(*(candidate + 1), candidate->m_angle, CarDirection::TurnSlightLeft, turn);
break;
}
// Check if this candidate is considered as leftmost as not too sharp.
// If yes - this candidate is leftmost, not route's one.
if (candidate->m_angle > -kMaxAbsAngleConsideredLeftOrRightMost)
break;
}
// Go from right to left to findout if the route goes through the rightmost candidate anf fixes can be applied.
// Other candidates which are sharper than kMaxAbsAngleConsideredLeftOrRightMost are ignored.
for (auto candidate = turnCandidates.rbegin(); candidate != turnCandidates.rend(); ++candidate)
{
if (candidate->m_segment == firstOutgoingSeg && candidate + 1 != turnCandidates.rend())
{
// The route goes along the rightmost candidate.
turn.m_turn = RightmostDirection(turnAngle);
if (IntermediateDirection(turnAngle) != turn.m_turn)
LOG(LDEBUG, ("Turn: ", turn.m_index, " RighmostDirection correction."));
// Compare with the next candidate to the left.
CorrectGoStraight(*(candidate + 1), candidate->m_angle, CarDirection::TurnSlightRight, turn);
break;
}
// Check if this candidate is considered as rightmost as not too sharp.
// If yes - this candidate is rightmost, not route's one.
if (candidate->m_angle < kMaxAbsAngleConsideredLeftOrRightMost)
break;
};
}
void GetTurnDirection(IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
TurnItem & turn)
{
TurnInfo turnInfo;
if (!GetTurnInfo(result, outgoingSegmentIndex, vehicleSettings, turnInfo))
return;
turn.m_sourceName = turnInfo.m_ingoing->m_name;
turn.m_targetName = turnInfo.m_outgoing->m_name;
turn.m_turn = CarDirection::None;
ASSERT_GREATER(turnInfo.m_ingoing->m_path.size(), 1, ());
TurnCandidates nodes;
size_t ingoingCount;
m2::PointD const junctionPoint = turnInfo.m_ingoing->m_path.back().GetPoint();
result.GetPossibleTurns(turnInfo.m_ingoing->m_segmentRange, junctionPoint, ingoingCount, nodes);
if (nodes.isCandidatesAngleValid)
{
ASSERT(is_sorted(nodes.candidates.begin(), nodes.candidates.end(), base::LessBy(&TurnCandidate::m_angle)),
("Turn candidates should be sorted by its angle field."));
}
if (nodes.candidates.size() == 0)
return;
// No turns are needed on transported road.
if (turnInfo.m_ingoing->m_highwayClass == HighwayClass::Transported && turnInfo.m_outgoing->m_highwayClass == HighwayClass::Transported)
return;
Segment firstOutgoingSeg;
bool const isFirstOutgoingSegValid = turnInfo.m_outgoing->m_segmentRange.GetFirstSegment(numMwmIds, firstOutgoingSeg);
if (!isFirstOutgoingSegValid)
return;
CorrectCandidatesSegmentByOutgoing(turnInfo, firstOutgoingSeg, nodes.candidates);
RemoveUTurnCandidate(turnInfo, numMwmIds, nodes.candidates);
auto const & turnCandidates = nodes.candidates;
// Check for enter or exit to/from roundabout.
if (turnInfo.m_ingoing->m_onRoundabout || turnInfo.m_outgoing->m_onRoundabout)
{
turn.m_turn = GetRoundaboutDirection(turnInfo, nodes, numMwmIds);
return;
}
double const turnAngle = CalcTurnAngle(result, outgoingSegmentIndex, numMwmIds, vehicleSettings);
CarDirection const intermediateDirection = IntermediateDirection(turnAngle);
// Checking for exits from highways.
turn.m_turn = TryToGetExitDirection(nodes, turnInfo, firstOutgoingSeg, intermediateDirection);
if (turn.m_turn != CarDirection::None)
return;
if (turnCandidates.size() == 1)
{
ASSERT(turnCandidates.front().m_segment == firstOutgoingSeg, ());
if (IsGoStraightOrSlightTurn(intermediateDirection))
return;
// IngoingCount includes ingoing segment and reversed outgoing (if it is not one-way).
// If any other one is present, turn (not straight or slight) is kept to prevent user from going to oneway alternative.
/// @todo Min abs angle of ingoing ones should be considered. If it's much bigger than route angle - ignore ingoing ones.
/// Now this data is not available from IRoutingResult::GetPossibleTurns().
if (ingoingCount <= 1 + size_t(!turnInfo.m_outgoing->m_isOneWay))
return;
}
// This angle is calculated using only 1 segment back and forward, not like turnAngle.
double turnOneSegmentAngle = CalcOneSegmentTurnAngle(turnInfo);
// To not discard some disputable turns let's use max by modulus from turnOneSegmentAngle and turnAngle.
// It's natural since angles of turnCandidates are calculated in IRoutingResult::GetPossibleTurns()
// according to CalcOneSegmentTurnAngle logic. And to be safe turnAngle is used too.
double turnAngleToCompare = turnAngle;
if (turnOneSegmentAngle <= 0 && turnAngle <= 0)
turnAngleToCompare = min(turnOneSegmentAngle, turnAngle);
else if (turnOneSegmentAngle >= 0 && turnAngle >= 0)
turnAngleToCompare = max(turnOneSegmentAngle, turnAngle);
else if (abs(turnOneSegmentAngle) > 10)
LOG(LWARNING, ("Significant angles are expected to have the same sign."));
if (CanDiscardTurnByHighwayClassOrAngles(intermediateDirection, turnAngleToCompare, turnCandidates, turnInfo, numMwmIds))
return;
turn.m_turn = intermediateDirection;
if (turnCandidates.size() >= 2)
CorrectRightmostAndLeftmost(turnCandidates, firstOutgoingSeg, turnAngle, turn);
}
void GetTurnDirectionPedestrian(IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
RoutingSettings const & vehicleSettings, TurnItem & turn)
{
TurnInfo turnInfo;
if (!GetTurnInfo(result, outgoingSegmentIndex, vehicleSettings, turnInfo))
return;
double const turnAngle = CalcTurnAngle(result, outgoingSegmentIndex, numMwmIds, vehicleSettings);
turn.m_sourceName = turnInfo.m_ingoing->m_name;
turn.m_targetName = turnInfo.m_outgoing->m_name;
turn.m_pedestrianTurn = PedestrianDirection::None;
ASSERT_GREATER(turnInfo.m_ingoing->m_path.size(), 1, ());
TurnCandidates nodes;
size_t ingoingCount = 0;
m2::PointD const junctionPoint = turnInfo.m_ingoing->m_path.back().GetPoint();
result.GetPossibleTurns(turnInfo.m_ingoing->m_segmentRange, junctionPoint, ingoingCount, nodes);
if (nodes.isCandidatesAngleValid)
{
ASSERT(is_sorted(nodes.candidates.begin(), nodes.candidates.end(), base::LessBy(&TurnCandidate::m_angle)),
("Turn candidates should be sorted by its angle field."));
}
if (nodes.candidates.size() == 0)
return;
turn.m_pedestrianTurn = IntermediateDirectionPedestrian(turnAngle);
if (turn.m_pedestrianTurn == PedestrianDirection::GoStraight)
{
turn.m_pedestrianTurn = PedestrianDirection::None;
return;
}
RemoveUTurnCandidate(turnInfo, numMwmIds, nodes.candidates);
// If there is no fork on the road we don't need to generate any turn. It is pointless because
// there is no possibility of leaving the route.
if (nodes.candidates.size() <= 1 || (std::fabs(CalcOneSegmentTurnAngle(turnInfo)) < kMaxForwardAngleActual && HasSingleForwardTurn(nodes)))
turn.m_pedestrianTurn = PedestrianDirection::None;
}
size_t CheckUTurnOnRoute(IRoutingResult const & result, size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
TurnItem & turn)
{
size_t constexpr kUTurnLookAhead = 3;
double constexpr kUTurnHeadingSensitivity = math::pi / 10.0;
auto const & segments = result.GetSegments();
// In this function we process the turn between the previous and the current
// segments. So we need a shift to get the previous segment.
ASSERT_GREATER(segments.size(), 1, ());
ASSERT_GREATER(outgoingSegmentIndex, 0, ());
ASSERT_GREATER(segments.size(), outgoingSegmentIndex, ());
auto const & masterSegment = segments[outgoingSegmentIndex - 1];
if (masterSegment.m_path.size() < 2)
return 0;
// Roundabout is not the UTurn.
if (masterSegment.m_onRoundabout)
return 0;
for (size_t i = 0; i < kUTurnLookAhead && i + outgoingSegmentIndex < segments.size(); ++i)
{
auto const & checkedSegment = segments[outgoingSegmentIndex + i];
if (checkedSegment.m_path.size() < 2)
return 0;
if (checkedSegment.m_name == masterSegment.m_name &&
checkedSegment.m_highwayClass == masterSegment.m_highwayClass &&
checkedSegment.m_isLink == masterSegment.m_isLink && !checkedSegment.m_onRoundabout)
{
auto const & path = masterSegment.m_path;
auto const & pointBeforeTurn = path[path.size() - 2];
auto const & turnPoint = path[path.size() - 1];
auto const & pointAfterTurn = checkedSegment.m_path[1];
// Same segment UTurn case.
if (i == 0)
{
// TODO Fix direction calculation.
// Warning! We can not determine UTurn direction in single edge case. So we use UTurnLeft.
// We decided to add driving rules (left-right sided driving) to mwm header.
if (pointBeforeTurn == pointAfterTurn && turnPoint != pointBeforeTurn)
{
turn.m_turn = CarDirection::UTurnLeft;
return 1;
}
// Wide UTurn must have link in it's middle.
return 0;
}
// Avoid the UTurn on unnamed roads inside the rectangle based distinct.
if (checkedSegment.m_name.empty())
return 0;
// Avoid returning to the same edge after uturn somewere else.
if (pointBeforeTurn == pointAfterTurn)
return 0;
m2::PointD const v1 = turnPoint.GetPoint() - pointBeforeTurn.GetPoint();
m2::PointD const v2 = pointAfterTurn.GetPoint() - checkedSegment.m_path[0].GetPoint();
auto angle = ang::TwoVectorsAngle(m2::PointD::Zero(), v1, v2);
if (!base::AlmostEqualAbs(angle, math::pi, kUTurnHeadingSensitivity))
return 0;
// Determine turn direction.
m2::PointD const junctionPoint = masterSegment.m_path.back().GetPoint();
m2::PointD const ingoingPoint = GetPointForTurn(
result, outgoingSegmentIndex, numMwmIds, vehicleSettings.m_maxIngoingPointsCount,
vehicleSettings.m_minIngoingDistMeters, false /* forward */);
m2::PointD const outgoingPoint = GetPointForTurn(
result, outgoingSegmentIndex, numMwmIds, vehicleSettings.m_maxOutgoingPointsCount,
vehicleSettings.m_minOutgoingDistMeters, true /* forward */);
if (PiMinusTwoVectorsAngle(junctionPoint, ingoingPoint, outgoingPoint) < 0)
turn.m_turn = CarDirection::UTurnLeft;
else
turn.m_turn = CarDirection::UTurnRight;
return i + 1;
}
}
return 0;
}
} // namespace turns
} // namespace routing

View file

@ -1,16 +1,9 @@
#pragma once
#include "routing/loaded_path_segment.hpp"
#include "routing/route.hpp"
#include "routing/router.hpp"
#include "routing/routing_callbacks.hpp"
#include "routing/routing_settings.hpp"
#include "routing/routing_result_graph.hpp"
#include "routing/segment.hpp"
#include "routing/turn_candidate.hpp"
#include "routing/turns.hpp"
#include "routing/vehicle_mask.hpp"
#include "traffic/traffic_info.hpp"
#include "routing_common/num_mwm_id.hpp"
@ -41,7 +34,7 @@ namespace turns
using TGetIndexFunction = std::function<size_t(std::pair<size_t, size_t>)>;
struct RoutePointIndex;
struct TurnInfo;
/*!
* \brief Calculates |nextIndex| which is an index of next route point at result.GetSegments().
@ -60,77 +53,55 @@ struct RoutePointIndex;
bool GetNextRoutePointIndex(IRoutingResult const & result, RoutePointIndex const & index,
NumMwmIds const & numMwmIds, bool const forward, RoutePointIndex & nextIndex);
/*!
* \brief Compute turn and time estimation structs for the abstract route result.
* \param result abstract routing result to annotate.
* \param delegate Routing callbacks delegate.
* \param points Storage for unpacked points of the path.
* \param turnsDir output turns annotation storage.
* \param streets output street names along the path.
* \param segments route segments.
* \return routing operation result code.
*/
RouterResultCode MakeTurnAnnotation(IRoutingResult const & result, NumMwmIds const & numMwmIds,
VehicleType const & vehicleType,
base::Cancellable const & cancellable,
std::vector<geometry::PointWithAltitude> & points,
Route::TTurns & turnsDir, Route::TStreets & streets,
std::vector<Segment> & segments);
RouterResultCode MakeTurnAnnotationPedestrian(
IRoutingResult const & result, NumMwmIds const & numMwmIds, VehicleType const & vehicleType,
base::Cancellable const & cancellable, std::vector<geometry::PointWithAltitude> & points,
Route::TTurns & turnsDir, Route::TStreets & streets, std::vector<Segment> & segments);
/*!
* \brief Selects lanes which are recommended for an end user.
*/
void SelectRecommendedLanes(Route::TTurns & turnsDir);
void FixupTurns(std::vector<geometry::PointWithAltitude> const & points, Route::TTurns & turnsDir);
void FixupTurnsPedestrian(std::vector<geometry::PointWithAltitude> const & junctions,
Route::TTurns & turnsDir);
inline size_t GetFirstSegmentPointIndex(std::pair<size_t, size_t> const & p) { return p.first; }
/*!
* \brief Calculates a turn instruction if the ingoing edge or (and) the outgoing edge belongs to a
* roundabout.
* \return Returns one of the following results:
* - TurnDirection::EnterRoundAbout if the ingoing edge does not belong to a roundabout
* and the outgoing edge belongs to a roundabout.
* - TurnDirection::StayOnRoundAbout if the ingoing edge and the outgoing edge belong to a
* roundabout
* and there is a reasonalbe way to leave the junction besides the outgoing edge.
* This function does not return TurnDirection::StayOnRoundAbout for small ways to leave the
* roundabout.
* - TurnDirection::NoTurn if the ingoing edge and the outgoing edge belong to a roundabout
* (a) and there is a single way (outgoing edge) to leave the junction.
* (b) and there is a way(s) besides outgoing edge to leave the junction (the roundabout)
* but it is (they are) relevantly small.
*/
CarDirection GetRoundaboutDirection(bool isIngoingEdgeRoundabout, bool isOutgoingEdgeRoundabout,
bool isMultiTurnJunction, bool keepTurnByHighwayClass);
bool GetTurnInfo(IRoutingResult const & result, size_t const outgoingSegmentIndex,
RoutingSettings const & vehicleSettings,
TurnInfo & turnInfo);
/// \returns angle, wchis is calculated using several backward and forward segments
/// from junction to consider smooth turns and remove noise.
double CalcTurnAngle(IRoutingResult const & result,
size_t const outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
RoutingSettings const & vehicleSettings);
void RemoveUTurnCandidate(TurnInfo const & turnInfo, NumMwmIds const & numMwmIds, std::vector<TurnCandidate> & turnCandidates);
/// \returns true if there is exactly 1 turn in |turnCandidates| with angle less then
/// |kMaxForwardAngleCandidates|.
bool HasSingleForwardTurn(TurnCandidates const & turnCandidates, float maxForwardAngleCandidates);
// It's possible that |firstOutgoingSeg| is not contained in |turnCandidates|.
// It may happened if |firstOutgoingSeg| and candidates in |turnCandidates| are from different mwms.
// Let's identify it in turnCandidates by angle and update according turnCandidate.
void CorrectCandidatesSegmentByOutgoing(TurnInfo const & turnInfo, Segment const & firstOutgoingSeg,
TurnCandidates & nodes);
/*!
* \brief GetTurnDirection makes a primary decision about turns on the route.
* \param outgoingSegmentIndex index of an outgoing segments in vector result.GetSegments().
* \param turn is used for keeping the result of turn calculation.
* \brief Returns ingoing point or outgoing point for turns.
* These points belong to the route but they often are not neighbor of junction point.
* To calculate the resulting point the function implements the following steps:
* - going from junction point along route path according to the direction which is set in GetPointIndex().
* - until one of following conditions is fulfilled:
* - more than |maxPointsCount| points are passed (returns the maxPointsCount-th point);
* - the length of passed parts of segment exceeds maxDistMeters;
* (returns the next point after the event)
* - an important bifurcation point is reached in case of outgoing point is looked up (forward == true).
* \param result information about the route. |result.GetSegments()| is composed of LoadedPathSegment.
* Each LoadedPathSegment is composed of several Segments. The sequence of Segments belongs to
* single feature and does not split by other features.
* \param outgoingSegmentIndex index in |segments|. Junction point noticed above is the first point
* of |outgoingSegmentIndex| segment in |result.GetSegments()|.
* \param maxPointsCount maximum number between the returned point and junction point.
* \param maxDistMeters maximum distance between the returned point and junction point.
* \param forward is direction of moving along the route to calculate the returned point.
* If forward == true the direction is to route finish. If forward == false the direction is to route start.
* \return an ingoing or outgoing point for a turn calculation.
*/
void GetTurnDirection(IRoutingResult const & result, size_t outgoingSegmentIndex,
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
TurnItem & turn);
void GetTurnDirectionPedestrian(IRoutingResult const & result, size_t outgoingSegmentIndex,
NumMwmIds const & numMwmIds,
RoutingSettings const & vehicleSettings, TurnItem & turn);
m2::PointD GetPointForTurn(IRoutingResult const & result, size_t outgoingSegmentIndex,
NumMwmIds const & numMwmIds, size_t const maxPointsCount,
double const maxDistMeters, bool const forward);
/*!
* \brief Finds an U-turn that starts from master segment and returns how many segments it lasts.
* \returns an index in |segments| that has the opposite direction with master segment
* (|segments[currentSegment - 1]|) and 0 if there is no UTurn.
* \warning |currentSegment| must be greater than 0.
*/
size_t CheckUTurnOnRoute(IRoutingResult const & result, size_t outgoingSegmentIndex,
NumMwmIds const & numMwmIds, RoutingSettings const & vehicleSettings,
TurnItem & turn);
} // namespace routing
} // namespace turns

View file

@ -34,6 +34,14 @@ struct TurnInfo
bool IsHighway(ftypes::HighwayClass hwClass, bool isLink);
bool IsSmallRoad(ftypes::HighwayClass hwClass);
// Min difference between HighwayClasses of the route segment and alternative turn segment
// to ignore this alternative candidate.
int constexpr kMinHighwayClassDiff = -2;
// Min difference between HighwayClasses of the route segment and alternative turn segment
// to ignore this alternative candidate (when alternative road is service).
int constexpr kMinHighwayClassDiffForService = -1;
/// * \returns difference between highway classes.
/// * It should be considered that bigger roads have smaller road class.
int CalcDiffRoadClasses(ftypes::HighwayClass const left, ftypes::HighwayClass const right);
@ -72,8 +80,7 @@ double CalcEstimatedTimeToPass(double const distanceMeters, ftypes::HighwayClass
bool PathIsFakeLoop(std::vector<geometry::PointWithAltitude> const & path);
// Returns distance in meters between |junctions[start]| and |junctions[end]|.
double CalcRouteDistanceM(std::vector<geometry::PointWithAltitude> const & junctions, uint32_t start,
uint32_t end);
double CalcRouteDistanceM(std::vector<geometry::PointWithAltitude> const & junctions, uint32_t start, uint32_t end);
/*!
* \brief Index of point in TUnpackedPathSegments. |m_segmentIndex| is a zero based index in vector
@ -91,8 +98,7 @@ std::string DebugPrint(RoutePointIndex const & index);
RoutePointIndex GetFirstOutgoingPointIndex(size_t const outgoingSegmentIndex);
RoutePointIndex GetLastIngoingPointIndex(TUnpackedPathSegments const & segments,
size_t const outgoingSegmentIndex);
RoutePointIndex GetLastIngoingPointIndex(TUnpackedPathSegments const & segments, size_t const outgoingSegmentIndex);
double CalcOneSegmentTurnAngle(TurnInfo const & turnInfo);
double CalcPathTurnAngle(LoadedPathSegment const & segment, size_t const pathIndex);