From 0d02eeb1a15f9278a37af60cbcaed12040c78fd9 Mon Sep 17 00:00:00 2001 From: martin-s Date: Wed, 24 Nov 2010 12:05:59 +0000 Subject: [PATCH] Add:Core:Avoid tracking calculation if result is ignored anyway git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3717 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/track.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/navit/navit/track.c b/navit/navit/track.c index 3a9f3cf..ec7b7d0 100644 --- a/navit/navit/track.c +++ b/navit/navit/track.c @@ -597,13 +597,13 @@ tracking_value(struct tracking *tr, struct tracking_line *t, int offset, struct value += tracking_angle_delta(tr, tr->curr_angle, t->angle[offset], sd->flags)*tr->angle_pref>>4; if (value >= min) return value; - if (flags & 4) + if ((flags & 4) && tr->connected_pref) value += tracking_is_connected(tr, tr->last, &sd->c[offset]); - if (flags & 8) + if ((flags & 8) && tr->nostop_pref) value += tracking_is_no_stop(tr, lpnt, &tr->last_out); if (value >= min) return value; - if (flags & 16) + if ((flags & 16) && tr->route_pref) value += tracking_is_on_route(tr, tr->rt, &sd->item); if ((flags & 32) && tr->overspeed_percent_pref && tr->overspeed_pref ) { struct roadprofile *roadprofile=g_hash_table_lookup(tr->vehicleprofile->roadprofile_hash, (void *)t->street->item.type); -- 2.7.4