reformat code using clang-format
This commit is contained in:
parent
25080aaf1d
commit
5d3123b97f
@ -153,8 +153,7 @@ void RestrictionMap::FixupStartingTurnRestriction(const NodeID node_u,
|
|||||||
|
|
||||||
// Check if edge (u, v) is the start of any turn restriction.
|
// Check if edge (u, v) is the start of any turn restriction.
|
||||||
// If so returns id of first target node.
|
// If so returns id of first target node.
|
||||||
NodeID RestrictionMap::CheckForEmanatingIsOnlyTurn(const NodeID node_u,
|
NodeID RestrictionMap::CheckForEmanatingIsOnlyTurn(const NodeID node_u, const NodeID node_v) const
|
||||||
const NodeID node_v) const
|
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(node_u != SPECIAL_NODEID);
|
BOOST_ASSERT(node_u != SPECIAL_NODEID);
|
||||||
BOOST_ASSERT(node_v != SPECIAL_NODEID);
|
BOOST_ASSERT(node_v != SPECIAL_NODEID);
|
||||||
|
@ -39,14 +39,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
|
|
||||||
struct RestrictionSource
|
struct RestrictionSource
|
||||||
{
|
{
|
||||||
NodeID start_node;
|
NodeID start_node;
|
||||||
NodeID via_node;
|
NodeID via_node;
|
||||||
|
|
||||||
RestrictionSource(NodeID start, NodeID via)
|
RestrictionSource(NodeID start, NodeID via) : start_node(start), via_node(via)
|
||||||
: start_node(start), via_node(via) {}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
friend inline bool operator==(const RestrictionSource &lhs, const RestrictionSource &rhs)
|
friend inline bool operator==(const RestrictionSource &lhs, const RestrictionSource &rhs)
|
||||||
{
|
{
|
||||||
@ -59,8 +59,9 @@ struct RestrictionTarget
|
|||||||
NodeID target_node;
|
NodeID target_node;
|
||||||
bool is_only;
|
bool is_only;
|
||||||
|
|
||||||
explicit RestrictionTarget(NodeID target, bool only)
|
explicit RestrictionTarget(NodeID target, bool only) : target_node(target), is_only(only)
|
||||||
: target_node(target), is_only(only) {}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
friend inline bool operator==(const RestrictionTarget &lhs, const RestrictionTarget &rhs)
|
friend inline bool operator==(const RestrictionTarget &lhs, const RestrictionTarget &rhs)
|
||||||
{
|
{
|
||||||
@ -102,7 +103,10 @@ class RestrictionMap
|
|||||||
NodeID CheckForEmanatingIsOnlyTurn(const NodeID u, const NodeID v) const;
|
NodeID CheckForEmanatingIsOnlyTurn(const NodeID u, const NodeID v) const;
|
||||||
bool CheckIfTurnIsRestricted(const NodeID u, const NodeID v, const NodeID w) const;
|
bool CheckIfTurnIsRestricted(const NodeID u, const NodeID v, const NodeID w) const;
|
||||||
bool IsViaNode(const NodeID node) const;
|
bool IsViaNode(const NodeID node) const;
|
||||||
unsigned size() { return m_count; }
|
unsigned size()
|
||||||
|
{
|
||||||
|
return m_count;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool IsSourceNode(const NodeID node) const;
|
bool IsSourceNode(const NodeID node) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user