Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2008, 11:11:21 PM (16 years ago)
Author:
nicolasc
Message:

well, it compiles..
there are only about 1000 warinig about a deprecated header usage in ogre, and some other uglinesses, but apart from that it builds… and still seg faults…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gcc43/src/network/Synchronisable.cc

    r1534 r1581  
    4343#include <string>
    4444#include <iostream>
     45#include <string.h>
    4546
    4647#include "core/CoreIncludes.h"
     
    4950namespace network
    5051{
    51  
    52  
     52
     53
    5354  int Synchronisable::state_=0x1; // detemines wheter we are server (default) or client
    54  
     55
    5556  /**
    5657  * Constructor:
     
    7273        delete (*it)->callback;
    7374  }
    74  
     75
    7576  bool Synchronisable::create(){
    7677    this->classID = this->getIdentifier()->getNetworkID();
     
    7879    return true;
    7980  }
    80  
     81
    8182  void Synchronisable::setClient(bool b){
    8283    if(b) // client
     
    9798    temp->size = size;
    9899    temp->var = var;
    99     temp->mode = mode; 
     100    temp->mode = mode;
    100101    temp->type = t;
    101102    temp->callback = cb;
    102     COUT(5) << "Syncronisable::registering var with size: " << temp->size << " and type: " << temp->type << std::endl; 
     103    COUT(5) << "Syncronisable::registering var with size: " << temp->size << " and type: " << temp->type << std::endl;
    103104    // increase datasize
    104105    datasize+=sizeof(int)+size;
     
    187188      switch((*i)->type){
    188189      case DATA:
    189         std::memcpy( (void *)(retVal.data+n), (void*)((*i)->var), (*i)->size);
     190        memcpy( (void *)(retVal.data+n), (void*)((*i)->var), (*i)->size);
    190191        n+=(*i)->size;
    191192        break;
     
    194195        n+=sizeof(int);
    195196        const char *data = ( ( *(std::string *) (*i)->var).c_str());
    196         std::memcpy( retVal.data+n, (void*)data, (*i)->size);
     197        memcpy( retVal.data+n, (void*)data, (*i)->size);
    197198        COUT(5) << "synchronisable: char: " << (const char *)(retVal.data+n) << " data: " << data << " string: " << *(std::string *)((*i)->var) << std::endl;
    198199        n+=(*i)->size;
     
    278279    return tsize;
    279280  }
    280  
     281
    281282  void Synchronisable::setBacksync(bool sync){
    282283    backsync_=sync;
     
    286287    return backsync_;
    287288  }
    288  
     289
    289290}
Note: See TracChangeset for help on using the changeset viewer.