- Timestamp:
- Nov 2, 2008, 12:54:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/packet/Gamestate.cc
r2111 r2112 38 38 39 39 40 namespace network{40 namespace orxonox { 41 41 42 42 namespace packet { … … 93 93 uint8_t *mem=data_; 94 94 mem+=sizeof(GamestateHeader); 95 orxonox::ObjectList<Synchronisable>::iterator it;96 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it){95 ObjectList<Synchronisable>::iterator it; 96 for(it = ObjectList<Synchronisable>::begin(); it; ++it){ 97 97 tempsize=it->getSize(id, mode); 98 98 … … 100 100 // start allocate additional memory 101 101 COUT(3) << "G.St.Man: need additional memory" << std::endl; 102 orxonox::ObjectList<Synchronisable>::iterator temp = it;102 ObjectList<Synchronisable>::iterator temp = it; 103 103 int addsize=tempsize; 104 104 while(++temp) … … 147 147 uint8_t *mem=data_+sizeof(GamestateHeader); 148 148 // get the start of the Synchronisable list 149 // orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin();149 //ObjectList<Synchronisable>::iterator it=ObjectList<Synchronisable>::begin(); 150 150 Synchronisable *s; 151 151 … … 244 244 //copy and modify header 245 245 #ifndef NDEBUG 246 HEADER->crc32 = orxonox::calcCRC(data_+sizeof(GamestateHeader), HEADER->datasize);246 HEADER->crc32 = calcCRC(data_+sizeof(GamestateHeader), HEADER->datasize); 247 247 #endif 248 248 *GAMESTATE_HEADER(ndata) = *HEADER; … … 281 281 } 282 282 #ifndef NDEBUG 283 assert(HEADER->crc32== orxonox::calcCRC(ndata+sizeof(GamestateHeader), HEADER->datasize));283 assert(HEADER->crc32==calcCRC(ndata+sizeof(GamestateHeader), HEADER->datasize)); 284 284 #endif 285 285 … … 569 569 int size=0; 570 570 // get the start of the Synchronisable list 571 orxonox::ObjectList<Synchronisable>::iterator it;571 ObjectList<Synchronisable>::iterator it; 572 572 // get total size of gamestate 573 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it)573 for(it = ObjectList<Synchronisable>::begin(); it; ++it) 574 574 size+=it->getSize(id, mode); // size of the actual data of the synchronisable 575 575 // size+=sizeof(GamestateHeader); … … 582 582 * @return iterator pointing to the next object in the list 583 583 */ 584 void Gamestate::removeObject( orxonox::ObjectList<Synchronisable>::iterator &it) {585 orxonox::ObjectList<Synchronisable>::iterator temp=it;584 void Gamestate::removeObject(ObjectList<Synchronisable>::iterator &it) { 585 ObjectList<Synchronisable>::iterator temp=it; 586 586 ++it; 587 587 delete *temp;
Note: See TracChangeset
for help on using the changeset viewer.