~ubuntu-branches/ubuntu/raring/simutrans/raring-proposed

« back to all changes in this revision

Viewing changes to dataobj/fahrplan.cc

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2011-11-03 19:59:02 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20111103195902-uopgwf488mfctb75
Tags: 111.0-1
* New upstream release.
* debian/rules: Update get-orig-source target for new upstream release.
* Use xz compression for source and binary packages.
* Use override_* targets to simplify debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
#include "../utils/cbuffer_t.h"
13
13
#include "../gui/messagebox.h"
14
 
#include "../bauer/hausbauer.h"
15
14
#include "../besch/haus_besch.h"
16
15
#include "../boden/grund.h"
17
16
#include "../dings/gebaeude.h"
18
 
#include "../dings/zeiger.h"
19
17
#include "../simdepot.h"
20
18
#include "loadsave.h"
21
19
 
249
247
                abgeschlossen = true;
250
248
        }
251
249
        if(aktuell>=eintrag.get_count()  ) {
252
 
                if(  eintrag.get_count()>0  ) {
 
250
                if (!eintrag.empty()) {
253
251
                        dbg->error("fahrplan_t::rdwr()","aktuell %i >count %i => aktuell = 0", aktuell, eintrag.get_count() );
254
252
                }
255
253
                aktuell = 0;
339
337
 
340
338
void schedule_t::sprintf_schedule( cbuffer_t &buf ) const
341
339
{
342
 
        buf.append( aktuell );
343
 
        buf.append( "|" );
344
 
        buf.append( (int)get_type() );
345
 
        buf.append( "|" );
 
340
        buf.printf("%u|%d|", aktuell, (int)get_type());
346
341
        for(  uint8 i = 0;  i<eintrag.get_count();  i++  ) {
347
342
                buf.printf( "%s,%i,%i|", eintrag[i].pos.get_str(), (int)eintrag[i].ladegrad, (int)eintrag[i].waiting_time_shift );
348
343
        }
353
348
{
354
349
        const char *p = ptr;
355
350
        // first: clear current schedule
356
 
        while(  eintrag.get_count()>0  ) {
 
351
        while (!eintrag.empty()) {
357
352
                remove();
358
353
        }
359
354
        //  first get aktuell pointer