Announce reference change if names are empty, #4830

This commit is contained in:
Michael Krasnyk 2018-01-26 08:35:11 -05:00
parent d706696179
commit 1119a542d6
4 changed files with 9 additions and 5 deletions

View File

@ -2,6 +2,8 @@
- Changes from 5.15.0:
- Bugfixes:
- FIXED: Segfault in map matching when RouteLeg collapsing code is run on a match with multiple submatches
- Guidance
- CHANGED #4830: Announce reference change if names are empty
- Profile:
- FIXED: `highway=service` will now be used for restricted access, `access=private` is still disabled for snapping.
- ADDED #4775: Exposes more information to the turn function, now being able to set turn weights with highway and access information of the turn as well as other roads at the intersection [#4775](https://github.com/Project-OSRM/osrm-backend/issues/4775)
@ -704,4 +706,4 @@
- `properties.traffic_signal_penalty`
- `properties.use_turn_restrictions`
- `properties.u_turn_penalty`
- `properties.allow_u_turn_at_via`
- `properties.allow_u_turn_at_via`

View File

@ -76,7 +76,7 @@ Feature: Basic Routing
When I route I should get
| waypoints | route | summary |
| a,c | , | 100, 101 |
| a,c | ,, | 100, 101 |
Scenario: Single Ref
Given the node map

View File

@ -394,8 +394,8 @@ Feature: New-Name Instructions
| bc | | US 422 | motorway |
When I route I should get
| waypoints | route | turns |
| a,c | , | depart,arrive |
| waypoints | route | turns |
| a,c | ,, | depart,new name straight,arrive |
Scenario: Spaces in refs for containment check, #3086
Given the node map

View File

@ -160,7 +160,9 @@ inline bool requiresNameAnnounced(const StringView &from_name,
const auto needs_announce =
// " (Ref)" -> "Name " and reverse
(from_name.empty() && !from_ref.empty() && !to_name.empty() && to_ref.empty()) ||
(!from_name.empty() && from_ref.empty() && to_name.empty() && !to_ref.empty());
(!from_name.empty() && from_ref.empty() && to_name.empty() && !to_ref.empty()) ||
// ... or names are empty but reference changed
(names_are_empty && !ref_is_contained);
const auto pronunciation_changes = from_pronunciation != to_pronunciation;