From 495c8724899b4109b00f583cd1954a959c4674d5 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Tue, 15 Jul 2014 11:46:26 +0200 Subject: [PATCH] add c'tors to QueryEdge and its EdgeData --- DataStructures/QueryEdge.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/DataStructures/QueryEdge.h b/DataStructures/QueryEdge.h index b84c180d5..280972721 100644 --- a/DataStructures/QueryEdge.h +++ b/DataStructures/QueryEdge.h @@ -36,6 +36,16 @@ struct QueryEdge NodeID target; struct EdgeData { + EdgeData() {} + + template 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)