typedef instead of enum for TravelMode to avoid gcc warnings

This commit is contained in:
Emil Tin
2014-08-18 15:11:24 +02:00
parent eb122a2b8c
commit 6cdc590db5
9 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ struct EdgeBasedNode
packed_geometry_id(SPECIAL_EDGEID),
fwd_segment_position( std::numeric_limits<unsigned short>::max() ),
is_in_tiny_cc(false),
travel_mode(TravelMode::Inaccessible),
backward_travel_mode(TravelMode::Inaccessible)
travel_mode(TRAVEL_MODE_INACCESSIBLE),
backward_travel_mode(TRAVEL_MODE_INACCESSIBLE)
{ }
explicit EdgeBasedNode(
+1 -1
View File
@@ -15,7 +15,7 @@ struct NodeBasedEdgeData
: distance(INVALID_EDGE_WEIGHT), edgeBasedNodeID(SPECIAL_NODEID),
nameID(std::numeric_limits<unsigned>::max()), type(std::numeric_limits<short>::max()),
isAccessRestricted(false), shortcut(false), forward(false), backward(false),
roundabout(false), ignore_in_grid(false), travel_mode(TravelMode::Inaccessible)
roundabout(false), ignore_in_grid(false), travel_mode(TRAVEL_MODE_INACCESSIBLE)
{
}
+1 -1
View File
@@ -50,7 +50,7 @@ struct OriginalEdgeData
: via_node(std::numeric_limits<unsigned>::max()),
name_id(std::numeric_limits<unsigned>::max()),
turn_instruction(TurnInstruction::NoTurn), compressed_geometry(false),
travel_mode(TravelMode::Inaccessible)
travel_mode(TRAVEL_MODE_INACCESSIBLE)
{
}
+2 -2
View File
@@ -66,8 +66,8 @@ struct PhantomNode
reverse_offset(0),
packed_geometry_id(SPECIAL_EDGEID),
fwd_segment_position(0),
travel_mode(TravelMode::Inaccessible),
backward_travel_mode(TravelMode::Inaccessible)
travel_mode(TRAVEL_MODE_INACCESSIBLE),
backward_travel_mode(TRAVEL_MODE_INACCESSIBLE)
{ }
NodeID forward_node_id;
+1 -1
View File
@@ -43,7 +43,7 @@ struct PathData
: node(SPECIAL_NODEID), name_id(INVALID_EDGE_WEIGHT),
segment_duration(INVALID_EDGE_WEIGHT),
turn_instruction(TurnInstruction::NoTurn),
travel_mode(TravelMode::Inaccessible)
travel_mode(TRAVEL_MODE_INACCESSIBLE)
{
}
+3 -3
View File
@@ -28,8 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef TRAVEL_MODE_H
#define TRAVEL_MODE_H
enum TravelMode : unsigned char {
Inaccessible=0, Default=1
};
typedef unsigned char TravelMode;
static const TravelMode TRAVEL_MODE_INACCESSIBLE = 0;
static const TravelMode TRAVEL_MODE_DEFAULT = 1;
#endif /* TRAVEL_MODE_H */