- Timestamp:
- Nov 6, 2015, 10:54:34 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc
r8858 r10768 60 60 { 61 61 GamestateManager::GamestateManager() : 62 currentGamestate_( 0), id_(0)62 currentGamestate_(nullptr), id_(0) 63 63 { 64 64 // trafficControl_ = new TrafficControl(); … … 140 140 141 141 bool GamestateManager::getSnapshot(){ 142 if ( currentGamestate_ != 0)142 if ( currentGamestate_ != nullptr ) 143 143 delete currentGamestate_; 144 144 uint8_t gsMode; … … 165 165 { //we have no data to send 166 166 delete currentGamestate_; 167 currentGamestate_= 0;167 currentGamestate_=nullptr; 168 168 return false; 169 169 } … … 191 191 unsigned int lastAckedGamestateID = peerIt->second.lastAckedGamestateID; 192 192 193 packet::Gamestate* baseGamestate= 0;193 packet::Gamestate* baseGamestate=nullptr; 194 194 if(lastAckedGamestateID != GAMESTATEID_INITIAL) 195 195 { … … 200 200 } 201 201 202 peerGamestates.push_back( 0); // insert an empty gamestate* to be changed202 peerGamestates.push_back(nullptr); // insert an empty gamestate* to be changed 203 203 finishGamestate( peerID, peerGamestates.back(), baseGamestate, currentGamestate_ ); 204 if( peerGamestates.back()== 0)204 if( peerGamestates.back()==nullptr ) 205 205 // nothing to send to remove pointer from vector 206 206 peerGamestates.pop_back(); … … 243 243 { 244 244 delete diffed1; 245 destgamestate = 0;245 destgamestate = nullptr; 246 246 return; 247 247 }
Note: See TracChangeset
for help on using the changeset viewer.