Remove unused memebers and rename to currrent style convention

This commit is contained in:
Patrick Niklaus
2015-06-28 22:13:54 +02:00
parent fd30e82836
commit faa880d60a
12 changed files with 97 additions and 116 deletions
+2
View File
@@ -37,6 +37,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <limits>
/// This is what StaticRTree serialized and stores on disk
/// It is generated in EdgeBasedGraphFactory.
struct EdgeBasedNode
{
EdgeBasedNode()
+2 -3
View File
@@ -49,7 +49,7 @@ bool NodeBasedEdge::operator<(const NodeBasedEdge &other) const
NodeBasedEdge::NodeBasedEdge()
: source(SPECIAL_NODEID), target(SPECIAL_NODEID), name_id(0), weight(0), forward(false),
backward(false), roundabout(false), in_tiny_cc(false),
backward(false), roundabout(false),
access_restricted(false), is_split(false), travel_mode(false)
{
}
@@ -61,12 +61,11 @@ NodeBasedEdge::NodeBasedEdge(NodeID source,
bool forward,
bool backward,
bool roundabout,
bool in_tiny_cc,
bool access_restricted,
TravelMode travel_mode,
bool is_split)
: source(source), target(target), name_id(name_id), weight(weight), forward(forward),
backward(backward), roundabout(roundabout), in_tiny_cc(in_tiny_cc),
backward(backward), roundabout(roundabout),
access_restricted(access_restricted), is_split(is_split), travel_mode(travel_mode)
{
}
-2
View File
@@ -43,7 +43,6 @@ struct NodeBasedEdge
bool forward,
bool backward,
bool roundabout,
bool in_tiny_cc,
bool access_restricted,
TravelMode travel_mode,
bool is_split);
@@ -55,7 +54,6 @@ struct NodeBasedEdge
bool forward : 1;
bool backward : 1;
bool roundabout : 1;
bool in_tiny_cc : 1;
bool access_restricted : 1;
bool is_split : 1;
TravelMode travel_mode : 4;
+15 -22
View File
@@ -39,32 +39,28 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct NodeBasedEdgeData
{
NodeBasedEdgeData()
: distance(INVALID_EDGE_WEIGHT), edgeBasedNodeID(SPECIAL_NODEID),
nameID(std::numeric_limits<unsigned>::max()), isAccessRestricted(false), shortcut(false),
forward(false), backward(false), roundabout(false), ignore_in_grid(false),
travel_mode(TRAVEL_MODE_INACCESSIBLE)
: distance(INVALID_EDGE_WEIGHT), edge_id(SPECIAL_NODEID),
name_id(std::numeric_limits<unsigned>::max()), access_restricted(false),
forward(false), backward(false), roundabout(false), travel_mode(TRAVEL_MODE_INACCESSIBLE)
{
}
NodeBasedEdgeData(int distance, unsigned edgeBasedNodeID, unsigned nameID,
bool isAccessRestricted, bool shortcut, bool forward, bool backward,
bool roundabout, bool ignore_in_grid, TravelMode travel_mode)
: distance(distance), edgeBasedNodeID(edgeBasedNodeID),
nameID(nameID), isAccessRestricted(isAccessRestricted), shortcut(shortcut),
forward(forward), backward(backward), roundabout(roundabout), ignore_in_grid(ignore_in_grid),
travel_mode(travel_mode)
NodeBasedEdgeData(int distance, unsigned edge_id, unsigned name_id,
bool access_restricted, bool forward, bool backward,
bool roundabout, TravelMode travel_mode)
: distance(distance), edge_id(edge_id),
name_id(name_id), access_restricted(access_restricted),
forward(forward), backward(backward), roundabout(roundabout), travel_mode(travel_mode)
{
}
int distance;
unsigned edgeBasedNodeID;
unsigned nameID;
bool isAccessRestricted : 1;
bool shortcut : 1;
unsigned edge_id;
unsigned name_id;
bool access_restricted : 1;
bool forward : 1;
bool backward : 1;
bool roundabout : 1;
bool ignore_in_grid : 1;
TravelMode travel_mode : 4;
void SwapDirectionFlags()
@@ -77,8 +73,7 @@ struct NodeBasedEdgeData
bool IsCompatibleTo(const NodeBasedEdgeData &other) const
{
return (forward == other.forward) && (backward == other.backward) &&
(nameID == other.nameID) && (ignore_in_grid == other.ignore_in_grid) &&
(travel_mode == other.travel_mode);
(name_id == other.name_id) && (travel_mode == other.travel_mode);
}
};
@@ -211,11 +206,9 @@ NodeBasedDynamicGraphFromImportEdges(int number_of_nodes, std::vector<NodeBasedE
edge.data.distance = static_cast<int>(import_edge.weight);
BOOST_ASSERT(edge.data.distance > 0);
edge.data.shortcut = false;
edge.data.roundabout = import_edge.roundabout;
edge.data.ignore_in_grid = import_edge.in_tiny_cc;
edge.data.nameID = import_edge.name_id;
edge.data.isAccessRestricted = import_edge.access_restricted;
edge.data.name_id = import_edge.name_id;
edge.data.access_restricted = import_edge.access_restricted;
edge.data.travel_mode = import_edge.travel_mode;
edges_list.push_back(edge);