remove unnecessary warnings, initialize correctly
This commit is contained in:
parent
d12a95b4ef
commit
59168e21b4
@ -34,6 +34,11 @@ struct RouteStep
|
|||||||
std::size_t geometry_begin;
|
std::size_t geometry_begin;
|
||||||
std::size_t geometry_end;
|
std::size_t geometry_end;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline RouteStep getInvalidRouteStep()
|
||||||
|
{
|
||||||
|
return {0, "", "", 0, 0, TRAVEL_MODE_INACCESSIBLE, getInvalidStepManeuver(), 0, 0};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef ENGINE_GUIDANCE_STEP_MANEUVER_HPP
|
#ifndef ENGINE_GUIDANCE_STEP_MANEUVER_HPP
|
||||||
#define ENGINE_GUIDANCE_STEP_MANEUVER_HPP
|
#define ENGINE_GUIDANCE_STEP_MANEUVER_HPP
|
||||||
|
|
||||||
#include "util/coordinate.hpp"
|
|
||||||
#include "extractor/guidance/turn_instruction.hpp"
|
#include "extractor/guidance/turn_instruction.hpp"
|
||||||
|
#include "util/coordinate.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -39,6 +39,18 @@ struct StepManeuver
|
|||||||
unsigned exit;
|
unsigned exit;
|
||||||
std::vector<IntermediateIntersection> intersections;
|
std::vector<IntermediateIntersection> intersections;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline StepManeuver getInvalidStepManeuver()
|
||||||
|
{
|
||||||
|
return {util::Coordinate{util::FloatLongitude{0.0}, util::FloatLatitude{0.0}},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
extractor::guidance::TurnInstruction::NO_TURN(),
|
||||||
|
WaypointType::None,
|
||||||
|
0,
|
||||||
|
{}};
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace guidance
|
} // namespace guidance
|
||||||
} // namespace engine
|
} // namespace engine
|
||||||
} // namespace osrmn
|
} // namespace osrmn
|
||||||
|
@ -35,8 +35,7 @@ namespace
|
|||||||
// invalidate a step and set its content to nothing
|
// invalidate a step and set its content to nothing
|
||||||
void invalidateStep(RouteStep &step)
|
void invalidateStep(RouteStep &step)
|
||||||
{
|
{
|
||||||
step = {};
|
step = getInvalidRouteStep();
|
||||||
step.maneuver.instruction = TurnInstruction::NO_TURN();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void print(const std::vector<RouteStep> &steps)
|
void print(const std::vector<RouteStep> &steps)
|
||||||
|
@ -42,7 +42,8 @@ FunctionalRoadClass functionalRoadClassFromTag(std::string const &value)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
util::SimpleLogger().Write(logDEBUG) << "Unknown road class encountered: " << value;
|
// TODO activate again, when road classes are moved to the profile
|
||||||
|
// util::SimpleLogger().Write(logDEBUG) << "Unknown road class encountered: " << value;
|
||||||
return FunctionalRoadClass::UNKNOWN;
|
return FunctionalRoadClass::UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -303,20 +303,7 @@ Intersection TurnHandler::handleComplexTurn(const EdgeID via_edge, Intersection
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fallback_count++ < 10)
|
assignTrivialTurns(via_edge,intersection,1,intersection.size());
|
||||||
{
|
|
||||||
util::SimpleLogger().Write(logWARNING)
|
|
||||||
<< "Resolved to keep fallback on complex turn assignment"
|
|
||||||
<< "Straightmost: " << straightmost_turn;
|
|
||||||
;
|
|
||||||
for (const auto &road : intersection)
|
|
||||||
{
|
|
||||||
const auto &out_data = node_based_graph.GetEdgeData(road.turn.eid);
|
|
||||||
util::SimpleLogger().Write(logWARNING)
|
|
||||||
<< "road: " << toString(road) << " Name: " << out_data.name_id
|
|
||||||
<< " Road Class: " << (int)out_data.road_classification.road_class;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return intersection;
|
return intersection;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user