summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <michael@vonglasow.com>2019-01-12 23:47:02 +0100
committerGitHub <noreply@github.com>2019-01-12 23:47:02 +0100
commit845dd4092ee64bbce0939299793336decafa40b8 (patch)
tree4b98381b97f8d0ea3dfa41787834175405ef9102
parent96d9c417d51964868da9c851abc176d703cddb33 (diff)
parent7e33361cdb444bd20fb0dedd65fb1097c8418fbd (diff)
downloadnavit-845dd4092ee64bbce0939299793336decafa40b8.tar.gz
Merge pull request #731 from navit-gps/traffic
Add:traffic:Use compare_name_systematic for all road refs
-rw-r--r--navit/traffic.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/navit/traffic.c b/navit/traffic.c
index a5862a625..7a0b74480 100644
--- a/navit/traffic.c
+++ b/navit/traffic.c
@@ -1459,8 +1459,7 @@ static int traffic_point_match_segment_attributes(struct traffic_point * this_,
route_follows_road |= !strcmp(start_name, end_name);
if (start_ref && end_ref)
- // TODO crude comparison in need of refinement
- route_follows_road |= !strcmp(start_ref, end_ref);
+ route_follows_road |= !compare_name_systematic(start_ref, end_ref);
/* check if we have a match for an off-route segment */
/* TODO consolidate these two loops, which differ only in their loop statement while the body is identical */
@@ -1480,11 +1479,10 @@ static int traffic_point_match_segment_attributes(struct traffic_point * this_,
route_leaves_road |= !strcmp(end_name, attr.u.str);
}
if (!route_leaves_road && item_attr_get(item, attr_street_name_systematic, &attr)) {
- // TODO crude comparison in need of refinement
if (start_ref)
- route_leaves_road |= !strcmp(start_ref, attr.u.str);
+ route_leaves_road |= !compare_name_systematic(start_ref, attr.u.str);
if (end_ref)
- route_leaves_road |= !strcmp(end_ref, attr.u.str);
+ route_leaves_road |= !compare_name_systematic(end_ref, attr.u.str);
}
}
map_rect_destroy(mr);
@@ -1506,11 +1504,10 @@ static int traffic_point_match_segment_attributes(struct traffic_point * this_,
route_leaves_road |= !strcmp(end_name, attr.u.str);
}
if (!route_leaves_road && item_attr_get(item, attr_street_name_systematic, &attr)) {
- // TODO crude comparison in need of refinement
if (start_ref)
- route_leaves_road |= !strcmp(start_ref, attr.u.str);
+ route_leaves_road |= !compare_name_systematic(start_ref, attr.u.str);
if (end_ref)
- route_leaves_road |= !strcmp(end_ref, attr.u.str);
+ route_leaves_road |= !compare_name_systematic(end_ref, attr.u.str);
}
}
map_rect_destroy(mr);