Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2015, 10:54:34 PM (8 years ago)
Author:
landauf
Message:

replace '0' by 'nullptr'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc

    r8858 r10768  
    6060{
    6161  GamestateManager::GamestateManager() :
    62   currentGamestate_(0), id_(0)
     62  currentGamestate_(nullptr), id_(0)
    6363  {
    6464//     trafficControl_ = new TrafficControl();
     
    140140
    141141  bool GamestateManager::getSnapshot(){
    142     if ( currentGamestate_ != 0 )
     142    if ( currentGamestate_ != nullptr )
    143143      delete currentGamestate_;
    144144    uint8_t gsMode;
     
    165165    { //we have no data to send
    166166      delete currentGamestate_;
    167       currentGamestate_=0;
     167      currentGamestate_=nullptr;
    168168      return false;
    169169    }
     
    191191      unsigned int lastAckedGamestateID = peerIt->second.lastAckedGamestateID;
    192192
    193       packet::Gamestate* baseGamestate=0;
     193      packet::Gamestate* baseGamestate=nullptr;
    194194      if(lastAckedGamestateID != GAMESTATEID_INITIAL)
    195195      {
     
    200200      }
    201201
    202       peerGamestates.push_back(0);  // insert an empty gamestate* to be changed
     202      peerGamestates.push_back(nullptr);  // insert an empty gamestate* to be changed
    203203      finishGamestate( peerID, peerGamestates.back(), baseGamestate, currentGamestate_ );
    204       if( peerGamestates.back()==0 )
     204      if( peerGamestates.back()==nullptr )
    205205        // nothing to send to remove pointer from vector
    206206        peerGamestates.pop_back();
     
    243243      {
    244244        delete diffed1;
    245         destgamestate = 0;
     245        destgamestate = nullptr;
    246246        return;
    247247      }
Note: See TracChangeset for help on using the changeset viewer.