Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaces and/not with &&/! for windows #1871

Merged
merged 4 commits into from
Jan 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/engine/api_response_generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void ApiResponseGenerator<DataFacadeT>::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;
}
Expand Down Expand Up @@ -190,7 +190,7 @@ ApiResponseGenerator<DataFacadeT>::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);
Expand Down Expand Up @@ -257,7 +257,7 @@ ApiResponseGenerator<DataFacadeT>::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))
{

Expand Down
10 changes: 5 additions & 5 deletions include/engine/guidance/segment_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ SegmentList<DataFacadeT>::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;
}
Expand Down Expand Up @@ -105,7 +105,7 @@ SegmentList<DataFacadeT>::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)
Expand Down Expand Up @@ -178,7 +178,7 @@ void SegmentList<DataFacadeT>::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)
{
Expand All @@ -191,8 +191,8 @@ void SegmentList<DataFacadeT>::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;
}
Expand Down
2 changes: 1 addition & 1 deletion include/engine/route_name_extraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ template <class DataFacadeT, class SegmentT> 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);
Expand Down