summaryrefslogtreecommitdiff
path: root/navit/traffic.c
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2019-08-10 20:44:03 +0200
committermvglasow <michael -at- vonglasow.com>2019-08-10 20:44:03 +0200
commitbcade3896a12a9fc2cbc30ec4cadea47819de820 (patch)
tree9304fe20c97f6671861604ae603523a662c2a90d /navit/traffic.c
parent4a474bc5b15c9447b23e2e2789bb6ffb17fb36fc (diff)
downloadnavit-bcade3896a12a9fc2cbc30ec4cadea47819de820.tar.gz
Refactor:traffic:move default item flags to global variable
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/traffic.c')
-rw-r--r--navit/traffic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/navit/traffic.c b/navit/traffic.c
index df5ab2898..835c15092 100644
--- a/navit/traffic.c
+++ b/navit/traffic.c
@@ -92,6 +92,9 @@
/** Time slice for idle loops, in milliseconds */
#define TIME_SLICE 40
+/** Default value assumed for access flags if we cannot get flags for the item, nor for the item type */
+int item_default_flags_value = AF_ALL;
+
/**
* @brief Private data shared between all traffic instances.
*/
@@ -1870,9 +1873,6 @@ static void traffic_location_populate_route_graph(struct traffic_location * this
/* Whether the current item is segmented */
int segmented;
- /* Default value assumed for access flags if we cannot get flags for the item, nor for the item type */
- int default_flags_value = AF_ALL;
-
/* Default flags assumed for the current item type */
int *default_flags;
@@ -1927,7 +1927,7 @@ static void traffic_location_populate_route_graph(struct traffic_location * this
segmented = 0;
if (!(default_flags = item_get_default_flags(item->type)))
- default_flags = &default_flags_value;
+ default_flags = &item_default_flags_value;
if (item_attr_get(item, attr_flags, &attr)) {
data.flags = attr.u.num;
segmented = (data.flags & AF_SEGMENTED);