diff options
author | mvglasow <michael -at- vonglasow.com> | 2019-01-08 00:28:28 +0100 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2019-01-08 00:28:28 +0100 |
commit | 1d813587ac2c5883cc07a84dbc48303fedfd5608 (patch) | |
tree | 92b3f74a7d6205ba6ae66a0c57ef0bcf0c231db9 /navit/traffic.c | |
parent | db03eb60cc5e89ca13ef6ae50ebbb7e41e28db81 (diff) | |
download | navit-1d813587ac2c5883cc07a84dbc48303fedfd5608.tar.gz |
Add:traffic:Use compare_name_systematic for all road refs
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/traffic.c')
-rw-r--r-- | navit/traffic.c | 13 |
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); |