reformat code using clang-format

This commit is contained in:
Dennis Luxen 2014-06-26 13:50:15 +02:00
parent 25080aaf1d
commit 5d3123b97f
2 changed files with 26 additions and 23 deletions

View File

@ -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);

View File

@ -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;