Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2809 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Nov 11, 2004, 2:17:48 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/importer: test if finalized before include new array-element

Location:
orxonox/branches/importer/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/importer/importer/array.cc

    r2808 r2809  
    1313  firstEntry->next =NULL;
    1414  currentEntry=firstEntry;
     15  finalized = false;
    1516  entryCount = 0; //0 means one entry
    1617  return;
     
    2930      walker = walker->next;
    3031    }
     32  finalized = true;
    3133  return;
    3234}
     
    3537void Array::addEntry (GLfloat entry)
    3638{
    37   if (verbose >= 3)
    38     printf ("adding new Entry to Array: %f\n", entry);
    39 
    40   entryCount++;
    41   currentEntry->value = entry;
    42   currentEntry->next = new Entry;
    43   currentEntry = currentEntry->next;
    44   currentEntry->next = NULL;
    45 
     39  if (!finalized)
     40    {
     41      if (verbose >= 3)
     42        printf ("adding new Entry to Array: %f\n", entry);
     43     
     44      entryCount++;
     45      currentEntry->value = entry;
     46      currentEntry->next = new Entry;
     47      currentEntry = currentEntry->next;
     48      currentEntry->next = NULL;
     49    }
     50  else
     51    if (verbose >= 1)
     52      printf ("adding failed, because list has been finalized\n");
    4653}
    4754
  • orxonox/branches/importer/importer/array.h

    r2807 r2809  
    2929  GLfloat* array;
    3030  int entryCount;
     31  bool finalized;
    3132  Entry* firstEntry;
    3233  Entry* currentEntry;
Note: See TracChangeset for help on using the changeset viewer.