bugfixing/classification

This commit is contained in:
Moritz Kobitzsch
2016-03-03 15:36:03 +01:00
committed by Patrick Niklaus
parent b08b360f38
commit 58628a4bfc
17 changed files with 214 additions and 121 deletions
+10 -6
View File
@@ -28,8 +28,14 @@ namespace json
namespace detail
{
const constexpr char *modifier_names[] = {"uturn", "sharp right", "right", "slight right",
"straight", "slight left", "left", "sharp left"};
const constexpr char *modifier_names[] = {"uturn",
"sharp right",
"right",
"slight right",
"straight",
"slight left",
"left",
"sharp left"};
// translations of TurnTypes. Not all types are exposed to the outside world.
// invalid types should never be returned as part of the API
@@ -40,12 +46,10 @@ const constexpr char *turn_type_names[] = {
"invalid", "invalid", "restriction", "notification"};
// Check whether to include a modifier in the result of the API
inline bool isValidModifier(const TurnType type,
const DirectionModifier modifier)
inline bool isValidModifier(const TurnType type, const DirectionModifier modifier)
{
if (type == TurnType::Location && modifier != DirectionModifier::Left &&
modifier != DirectionModifier::Straight &&
modifier != DirectionModifier::Right)
modifier != DirectionModifier::Straight && modifier != DirectionModifier::Right)
return false;
return true;
}