diff --git a/Descriptors/DescriptionFactory.cpp b/Descriptors/DescriptionFactory.cpp index 36e94c6a9..1c5f8628e 100644 --- a/Descriptors/DescriptionFactory.cpp +++ b/Descriptors/DescriptionFactory.cpp @@ -89,11 +89,19 @@ void DescriptionFactory::AppendSegment(const FixedPointCoordinate &coordinate, } // make sure mode changes are announced, even when there otherwise is no turn - const TurnInstruction turn = - (TurnInstruction::NoTurn == path_point.turn_instruction && - path_description.front().travel_mode != path_point.travel_mode && - path_point.segment_duration>0) ? TurnInstruction::GoStraight - : path_point.turn_instruction; + const TurnInstruction turn = [] -> TurnInstruction () + { + if (TurnInstruction::NoTurn == path_point.turn_instruction && + path_description.front().travel_mode != path_point.travel_mode && + path_point.segment_duration>0) + { + return TurnInstruction::GoStraight; + } + else + { + return path_point.turn_instruction + } + } path_description.emplace_back(coordinate, path_point.name_id,