summaryrefslogtreecommitdiff
path: root/navit/traffic
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-01-06 23:12:55 +0100
committermvglasow <michael -at- vonglasow.com>2018-01-06 23:12:55 +0100
commitc0f29aa057f5ed7661b58600137798fb38ea6709 (patch)
tree4ea59d6a7a14a8894015f4ccfa3cddbcb02ca715 /navit/traffic
parentd0c93018abcbb5bfb7af9f95efc0c2ccecccd832 (diff)
downloadnavit-c0f29aa057f5ed7661b58600137798fb38ea6709.tar.gz
Refactor:traffic:rework traffic_message convenience constructors
Assume messages created by convenience constructors are not cancellations, introduce new convenience constructor for cancellation messages Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/traffic')
-rw-r--r--navit/traffic/dummy/traffic_dummy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/navit/traffic/dummy/traffic_dummy.c b/navit/traffic/dummy/traffic_dummy.c
index 7ca085197..6347b4e16 100644
--- a/navit/traffic/dummy/traffic_dummy.c
+++ b/navit/traffic/dummy/traffic_dummy.c
@@ -88,14 +88,14 @@ struct traffic_message ** traffic_dummy_get_messages(struct traffic_priv * this_
location = traffic_location_new(NULL, from, to, "Nürnberg", NULL, location_dir_one,
location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A9", "58:1", -1);
messages[0] = traffic_message_new_single_event("dummy:A9-68-67", time(NULL), time(NULL),
- time(NULL) + 86400, 0, 0, location, event_class_congestion, event_congestion_queue);
+ time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_queue);
from = traffic_point_new(11.4481, 48.1266, "Gräfelfing", "36b", "12961-2");
to = traffic_point_new(11.5028, 48.1258, "München-Laim", "38", "12961");
location = traffic_location_new(NULL, from, to, "München", NULL, location_dir_one,
location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A96", "58:1", -1);
messages[1] = traffic_message_new_single_event("dummy:A96-36b-38", time(NULL), time(NULL),
- time(NULL) + 86400, 0, 0, location, event_class_congestion, event_congestion_slow_traffic);
+ time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_slow_traffic);
break;
case 11:
@@ -106,14 +106,14 @@ struct traffic_message ** traffic_dummy_get_messages(struct traffic_priv * this_
location = traffic_location_new(NULL, from, to, "Nürnberg", NULL, location_dir_one,
location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A9", "58:1", -1);
messages[0] = traffic_message_new_single_event("dummy:A9-68-67", time(NULL) - 10, time(NULL),
- time(NULL) + 86400, 0, 0, location, event_class_congestion, event_congestion_queue);
+ time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_queue);
from = traffic_point_new(11.4481, 48.1266, "Gräfelfing", "36b", "12961-2");
to = traffic_point_new(11.5028, 48.1258, "München-Laim", "38", "12961");
location = traffic_location_new(NULL, from, to, "München", NULL, location_dir_one,
location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A96", "58:1", -1);
- messages[1] = traffic_message_new_short("dummy:A96-36b-38", time(NULL) - 10, time(NULL),
- time(NULL) + 86400, 1, 0, location, 0, NULL);
+ messages[1] = traffic_message_new_cancellation("dummy:A96-36b-38", time(NULL) - 10, time(NULL),
+ time(NULL) + 86400, location);
break;
default: