Upgrade formatting to clang-format 10 (#5895)
* Update formatting tools to clang-format-10 * Reformat using clang-format-10.0.09
This commit is contained in:
@@ -51,8 +51,8 @@ inline void writeTurnData(const boost::filesystem::path &path,
|
||||
writer.WriteFrom("/common/connectivity_checksum", connectivity_checksum);
|
||||
serialization::write(writer, "/common/turn_data", turn_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace files
|
||||
} // namespace guidance
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@ void annotateTurns(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
EntryClassesMap &entry_class_hash,
|
||||
std::uint32_t &connectivity_checksum);
|
||||
|
||||
} // namespace customizer
|
||||
} // namespace guidance
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -172,7 +172,7 @@ inline bool roadHasLowerClass(const util::NodeBasedEdgeData &from_data,
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
template <typename IntersectionType> // works with Intersection and IntersectionView
|
||||
inline bool
|
||||
@@ -213,7 +213,6 @@ IntersectionHandler::IsDistinctNarrowTurn(const EdgeID via_edge,
|
||||
// check if there are other narrow turns are not considered passing a low category or simply
|
||||
// a link of the same type as the potentially obvious turn
|
||||
auto const is_similar_turn = [&](auto const &road) {
|
||||
|
||||
// 1. Skip the candidate road
|
||||
if (road.eid == candidate->eid)
|
||||
{
|
||||
@@ -409,7 +408,6 @@ IntersectionHandler::IsDistinctWideTurn(const EdgeID via_edge,
|
||||
// check if there is any turn, that might look just as obvious, even though it might not
|
||||
// be allowed. Entry-allowed isn't considered a valid distinction criterion here
|
||||
auto const is_similar_turn = [&](auto const &road) {
|
||||
|
||||
// 1. Skip over our candidate
|
||||
if (road.eid == candidate->eid)
|
||||
return false;
|
||||
@@ -644,7 +642,7 @@ std::size_t IntersectionHandler::findObviousTurn(const EdgeID via_edge,
|
||||
const auto all_roads_have_same_name =
|
||||
std::all_of(intersection.begin(),
|
||||
intersection.end(),
|
||||
[ id = via_edge_annotation.name_id, this ](auto const &road) {
|
||||
[id = via_edge_annotation.name_id, this](auto const &road) {
|
||||
auto const data_id = node_based_graph.GetEdgeData(road.eid).annotation_data;
|
||||
auto const name_id = node_data_container.GetAnnotation(data_id).name_id;
|
||||
return (name_id != EMPTY_NAMEID) && (name_id == id);
|
||||
|
||||
@@ -20,5 +20,5 @@ namespace guidance
|
||||
// - square/circle intersections
|
||||
std::unordered_set<EdgeID> findSegregatedNodes(const extractor::NodeBasedGraphFactory &factory,
|
||||
const extractor::NameTable &names);
|
||||
}
|
||||
}
|
||||
} // namespace guidance
|
||||
} // namespace osrm
|
||||
|
||||
@@ -49,8 +49,8 @@ inline void write(storage::tar::FileWriter &writer,
|
||||
storage::serialization::write(
|
||||
writer, name + "/post_turn_bearings", turn_data_container.post_turn_bearings);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace serialization
|
||||
} // namespace guidance
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,7 @@ template <storage::Ownership Ownership>
|
||||
void write(storage::tar::FileWriter &writer,
|
||||
const std::string &name,
|
||||
const detail::TurnDataContainerImpl<Ownership> &turn_data);
|
||||
}
|
||||
} // namespace serialization
|
||||
|
||||
struct TurnData
|
||||
{
|
||||
@@ -111,12 +111,12 @@ template <storage::Ownership Ownership> class TurnDataContainerImpl
|
||||
Vector<TurnBearing> pre_turn_bearings;
|
||||
Vector<TurnBearing> post_turn_bearings;
|
||||
};
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
using TurnDataExternalContainer = detail::TurnDataContainerImpl<storage::Ownership::External>;
|
||||
using TurnDataContainer = detail::TurnDataContainerImpl<storage::Ownership::Container>;
|
||||
using TurnDataView = detail::TurnDataContainerImpl<storage::Ownership::View>;
|
||||
}
|
||||
}
|
||||
} // namespace guidance
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ const constexpr Enum SlightLeft = 5;
|
||||
const constexpr Enum Left = 6;
|
||||
const constexpr Enum SharpLeft = 7;
|
||||
const constexpr Enum MaxDirectionModifier = 8;
|
||||
}
|
||||
} // namespace DirectionModifier
|
||||
|
||||
namespace TurnType
|
||||
{
|
||||
@@ -63,7 +63,7 @@ const constexpr Enum StayOnRoundabout = 25; // Continue on Either a small or a l
|
||||
const constexpr Enum Sliproad =
|
||||
26; // Something that looks like a ramp, but is actually just a small sliproad
|
||||
const constexpr Enum MaxTurnType = 27; // Special value for static asserts
|
||||
}
|
||||
} // namespace TurnType
|
||||
|
||||
struct TurnInstruction
|
||||
{
|
||||
@@ -367,7 +367,7 @@ const constexpr TurnTypeName turn_type_names[] = {
|
||||
{"invalid", "(sliproad)"},
|
||||
{"MAXVALUE", "MAXVALUE"}};
|
||||
|
||||
} // ns detail
|
||||
} // namespace detail
|
||||
|
||||
inline std::string instructionTypeToString(const TurnType::Enum type)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ LaneDataVector::iterator findTag(const extractor::TurnLaneType::Mask tag, LaneDa
|
||||
|
||||
// Returns true if any of the queried tags is contained
|
||||
bool hasTag(const extractor::TurnLaneType::Mask tag, const LaneDataVector &data);
|
||||
} // namespace lane_data_generation
|
||||
} // namespace lanes
|
||||
|
||||
} // namespace guidance
|
||||
} // namespace osrm
|
||||
|
||||
@@ -34,7 +34,8 @@ namespace lanes
|
||||
|
||||
namespace
|
||||
{
|
||||
typedef enum TurnLaneScenario {
|
||||
typedef enum TurnLaneScenario
|
||||
{
|
||||
SIMPLE, // a straightforward assignment
|
||||
PARTITION_LOCAL, // an assignment that requires partitioning, using local turns
|
||||
SIMPLE_PREVIOUS, // an assignemtnn using the turns specified at the previous road (e.g.
|
||||
|
||||
Reference in New Issue
Block a user