Big Restructuring / Cleanup

This commit is contained in:
Patrick Niklaus
2016-03-01 22:30:31 +01:00
parent adb8d0e845
commit b08b360f38
40 changed files with 419 additions and 511 deletions
+11 -5
View File
@@ -1,10 +1,15 @@
#include "engine/guidance/post_processing.hpp"
#include "engine/guidance/turn_instruction.hpp"
#include "engine/guidance/guidance_toolkit.hpp"
#include "extractor/guidance/turn_instruction.hpp"
#include "engine/guidance/toolkit.hpp"
#include <boost/assert.hpp>
#include <iostream>
using TurnInstruction = osrm::extractor::guidance::TurnInstruction;
using TurnType = osrm::extractor::guidance::TurnType;
using DirectionModifier = osrm::extractor::guidance::DirectionModifier;
namespace osrm
{
namespace engine
@@ -118,10 +123,11 @@ std::vector<std::vector<PathData>> postProcess(std::vector<std::vector<PathData>
{
if (!on_roundabout)
{
BOOST_ASSERT(leg_data[0][0].turn_instruction.type == TurnInstruction::NO_TURN());
if (path_data[data_index].turn_instruction.type == ExitRoundabout)
BOOST_ASSERT(leg_data[0][0].turn_instruction.type ==
TurnInstruction::NO_TURN());
if (path_data[data_index].turn_instruction.type == TurnType::ExitRoundabout)
leg_data[0][0].turn_instruction.type = TurnType::EnterRoundabout;
if (path_data[data_index].turn_instruction.type == ExitRotary)
if (path_data[data_index].turn_instruction.type == TurnType::ExitRotary)
leg_data[0][0].turn_instruction.type = TurnType::EnterRotary;
path_data[data_index].exit += 1;
}