From a2555983e66f96be5bc026ed7f0164623fdde3a5 Mon Sep 17 00:00:00 2001 From: Moritz Kobitzsch Date: Fri, 8 Jan 2016 12:43:33 +0100 Subject: [PATCH 1/4] replaces and/not with &&/! for windows --- include/engine/api_response_generator.hpp | 2 +- include/engine/guidance/segment_list.hpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/engine/api_response_generator.hpp b/include/engine/api_response_generator.hpp index d8c16ba3344..9b056ed6113 100644 --- a/include/engine/api_response_generator.hpp +++ b/include/engine/api_response_generator.hpp @@ -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; } From 8638cbf8b2c0bf81dff00ac72207a706445e9b6d Mon Sep 17 00:00:00 2001 From: Moritz Kobitzsch Date: Fri, 8 Jan 2016 13:31:16 +0100 Subject: [PATCH 2/4] missed a not --- include/engine/api_response_generator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/engine/api_response_generator.hpp b/include/engine/api_response_generator.hpp index 9b056ed6113..7f4d66cf95e 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; } From 4dc6ff9fb8931bd4fa90a61c0feea5e5904723cf Mon Sep 17 00:00:00 2001 From: Moritz Kobitzsch Date: Fri, 8 Jan 2016 14:29:09 +0100 Subject: [PATCH 3/4] and another missed not --- include/engine/route_name_extraction.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From 23cd4d5ed223755ad8068a6d3c9fe5c3cffacd91 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Sat, 9 Jan 2016 17:32:40 +0100 Subject: [PATCH 4/4] not -> ! --- include/engine/api_response_generator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/engine/api_response_generator.hpp b/include/engine/api_response_generator.hpp index 7f4d66cf95e..77a220d7ebf 100644 --- a/include/engine/api_response_generator.hpp +++ b/include/engine/api_response_generator.hpp @@ -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);