add c'tors to QueryEdge and its EdgeData
This commit is contained in:
parent
8c09edfdbd
commit
495c872489
@ -36,6 +36,16 @@ struct QueryEdge
|
||||
NodeID target;
|
||||
struct EdgeData
|
||||
{
|
||||
EdgeData() {}
|
||||
|
||||
template <class OtherT> EdgeData(const OtherT &other)
|
||||
{
|
||||
distance = other.distance;
|
||||
shortcut = other.shortcut;
|
||||
id = other.id;
|
||||
forward = other.forward;
|
||||
backward = other.backward;
|
||||
}
|
||||
NodeID id : 31;
|
||||
bool shortcut : 1;
|
||||
int distance : 30;
|
||||
@ -43,6 +53,13 @@ struct QueryEdge
|
||||
bool backward : 1;
|
||||
} data;
|
||||
|
||||
QueryEdge() : source(SPECIAL_NODEID), target(SPECIAL_NODEID) {}
|
||||
|
||||
QueryEdge(NodeID source, NodeID target, EdgeData data)
|
||||
: source(source), target(target), data(data)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator<(const QueryEdge &right) const
|
||||
{
|
||||
if (source != right.source)
|
||||
|
Loading…
Reference in New Issue
Block a user