diff --git a/include/engine/api_response_generator.hpp b/include/engine/api_response_generator.hpp index d8c16ba3344..77a220d7ebf 100644 --- a/include/engine/api_response_generator.hpp +++ b/include/engine/api_response_generator.hpp @@ -96,7 +96,7 @@ void ApiResponseGenerator::DescribeRoute(const RouteParameters &con const InternalRouteResult &raw_route, util::json::Object &json_result) { - if (not raw_route.is_valid()) + if (!raw_route.is_valid()) { return; } @@ -190,7 +190,7 @@ ApiResponseGenerator::SummarizeRoute(const InternalRouteResult &raw const Segments &segment_list) const { util::json::Object json_route_summary; - if (not raw_route.segment_end_coordinates.empty()) + if (!raw_route.segment_end_coordinates.empty()) { const auto start_name_id = raw_route.segment_end_coordinates.front().source_phantom.name_id; json_route_summary.values["start_point"] = facade->get_name_for_id(start_name_id); @@ -257,7 +257,7 @@ ApiResponseGenerator::BuildRouteSegments(const Segments &segment_li for (const auto &segment : segment_list.Get()) { const auto current_turn = segment.turn_instruction; - if (extractor::TurnInstructionsClass::TurnIsNecessary(current_turn) and + if (extractor::TurnInstructionsClass::TurnIsNecessary(current_turn) && (extractor::TurnInstruction::EnterRoundAbout != current_turn)) { diff --git a/include/engine/guidance/segment_list.hpp b/include/engine/guidance/segment_list.hpp index 8ae9b688415..51a1695bdf9 100644 --- a/include/engine/guidance/segment_list.hpp +++ b/include/engine/guidance/segment_list.hpp @@ -77,7 +77,7 @@ SegmentList::SegmentList(const InternalRouteResult &raw_route, const DataFacade *facade) : total_distance(0), total_duration(0) { - if (not raw_route.is_valid()) + if (!raw_route.is_valid()) { return; } @@ -105,7 +105,7 @@ SegmentList::SegmentList(const InternalRouteResult &raw_route, } } - if (not allow_simplification) + if (!allow_simplification) { // to prevent any simplifications, we mark all segments as necessary for (auto &segment : segments) @@ -178,7 +178,7 @@ void SegmentList::AppendSegment(const FixedPointCoordinate &coordin { // if the start location is on top of a node, the first movement might be zero-length, // in which case we dont' add a new description, but instead update the existing one - if ((1 == segments.size()) and (segments.front().location == coordinate)) + if ((1 == segments.size()) && (segments.front().location == coordinate)) { if (path_point.segment_duration > 0) { @@ -191,8 +191,8 @@ void SegmentList::AppendSegment(const FixedPointCoordinate &coordin // make sure mode changes are announced, even when there otherwise is no turn const auto getTurn = [](const PathData &path_point, const extractor::TravelMode previous_mode) { - if (extractor::TurnInstruction::NoTurn == path_point.turn_instruction and - previous_mode != path_point.travel_mode and path_point.segment_duration > 0) + if (extractor::TurnInstruction::NoTurn == path_point.turn_instruction && + previous_mode != path_point.travel_mode && path_point.segment_duration > 0) { return extractor::TurnInstruction::GoStraight; } diff --git a/include/engine/route_name_extraction.hpp b/include/engine/route_name_extraction.hpp index dd28f97c175..e9070b486c9 100644 --- a/include/engine/route_name_extraction.hpp +++ b/include/engine/route_name_extraction.hpp @@ -129,7 +129,7 @@ template struct ExtractRouteNames route_names.shortest_path_name_1 = facade->get_name_for_id(shortest_segment_1.name_id); route_names.shortest_path_name_2 = facade->get_name_for_id(shortest_segment_2.name_id); - if (not alternative_path_segments.empty()) + if (!alternative_path_segments.empty()) { route_names.alternative_path_name_1 = facade->get_name_for_id(alternative_segment_1.name_id);