Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2009, 11:12:14 AM (15 years ago)
Author:
rgrieder
Message:

Further optimisations by using std::vector instead of std::list for the sync lists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp/src/network/synchronisable/Synchronisable.h

    r2822 r2823  
    3333
    3434#include <list>
     35#include <vector>
    3536#include <map>
    3637#include <queue>
     
    156157    uint32_t classID;
    157158
    158     std::list<SynchronisableVariableBase*> syncList;
    159     std::list<SynchronisableVariableBase*> stringList;
     159    std::vector<SynchronisableVariableBase*> syncList;
     160    std::vector<SynchronisableVariableBase*> stringList;
    160161    uint32_t dataSize_; //size of all variables except strings
    161162    static uint8_t state_; // detemines wheter we are server (default) or client
     
    196197
    197198//   template <class T> void Synchronisable::unregisterVariable(T& var){
    198 //     std::list<SynchronisableVariableBase*>::iterator it = syncList.begin();
     199//     std::vector<SynchronisableVariableBase*>::iterator it = syncList.begin();
    199200//     while(it!=syncList.end()){
    200201//       if( ((*it)->getReference()) == &var ){
Note: See TracChangeset for help on using the changeset viewer.