Parcourir la source

small calculation reduction

tarfeef101 il y a 6 ans
Parent
commit
0722a51cce
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      kern/synchprobs/traffic_synch.c

+ 1 - 1
kern/synchprobs/traffic_synch.c

@@ -107,7 +107,7 @@ void intersection_before_entry(Direction origin, Direction destination)
     
     if (temp)
     {
-      if ((temp->origin == new->origin && temp->dest != new->dest) || (temp->origin == new->dest && temp->dest == new->origin) || (temp->dest != new->dest && ((new->origin - new->dest == 1 || new->origin - new->dest == -3) || (temp->origin - temp->dest == 1 || temp->origin - temp->dest == -3))))
+      if ((temp->origin == new->origin && temp->dest != new->dest) || (temp->origin == new->dest && temp->dest == new->origin) || (temp->dest != new->dest && ((new->origin - new->dest == 1 || new->origin - new->dest == -3) || ((temp->origin - temp->dest) == 1 || (temp->origin - temp->dest) == -3))))
       {
         continue;
       }