The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: knightly on May 12, 2009, 02:40:10 PM

Title: [Code v3.7] Duplicated Code in rebuild_connexions()
Post by: knightly on May 12, 2009, 02:40:10 PM
James, I guess the following 2 lines in blue are duplicated?

Quote

   // now for the lines
   ITERATE(registered_lines,i)
   {
      const linehandle_t line = registered_lines[ i ];
      fpl = line->get_schedule();
      assert(fpl);
      // ok, now add line to the connections
      if(line->count_convoys( )> 0 && (i_am_public || line->get_convoy(0)->get_besitzer() == get_besitzer()))
      {
         INT_CHECK("simhalt.cc 613");
         schedule_t *fpl = line->get_schedule();

         if(fpl != NULL)
         {
            halthandle_t tmp_halt;

Title: Re: [Code v3.7] Duplicated Code in rebuild_connexions()
Post by: jamespetts on May 12, 2009, 05:07:28 PM
Well spotted!