remove unnecessary warnings, initialize correctly

This commit is contained in:
Moritz Kobitzsch
2016-05-02 15:32:28 +02:00
committed by Patrick Niklaus
parent d12a95b4ef
commit 59168e21b4
5 changed files with 23 additions and 19 deletions
+5
View File
@@ -34,6 +34,11 @@ struct RouteStep
std::size_t geometry_begin;
std::size_t geometry_end;
};
inline RouteStep getInvalidRouteStep()
{
return {0, "", "", 0, 0, TRAVEL_MODE_INACCESSIBLE, getInvalidStepManeuver(), 0, 0};
}
}
}
}
+14 -2
View File
@@ -1,8 +1,8 @@
#ifndef ENGINE_GUIDANCE_STEP_MANEUVER_HPP
#define ENGINE_GUIDANCE_STEP_MANEUVER_HPP
#include "util/coordinate.hpp"
#include "extractor/guidance/turn_instruction.hpp"
#include "util/coordinate.hpp"
#include <cstdint>
#include <vector>
@@ -21,7 +21,7 @@ enum class WaypointType : std::uint8_t
Depart,
};
//A represenetation of intermediate intersections
// A represenetation of intermediate intersections
struct IntermediateIntersection
{
double duration;
@@ -39,6 +39,18 @@ struct StepManeuver
unsigned exit;
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 engine
} // namespace osrmn