Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/libraries/network/FunctionCallManager.cc

    r10624 r11054  
    3737
    3838std::map<uint32_t, packet::FunctionCalls*> FunctionCallManager::sPeerMap_;
    39 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t> > > FunctionCallManager::sIncomingFunctionCallBuffer_;
     39std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t>>> FunctionCallManager::sIncomingFunctionCallBuffer_;
    4040
    4141
     
    5454void FunctionCallManager::sendCalls(orxonox::Host* host)
    5555{
    56   std::map<uint32_t, packet::FunctionCalls*>::iterator it;
    57   for (it = FunctionCallManager::sPeerMap_.begin(); it != FunctionCallManager::sPeerMap_.end(); ++it )
     56  for (const auto& mapEntry : FunctionCallManager::sPeerMap_ )
    5857  {
    5958    assert(!FunctionCallManager::sPeerMap_.empty());
    60     it->second->send(host);
     59    mapEntry.second->send(host);
    6160  }
    6261  FunctionCallManager::sPeerMap_.clear();
     
    6564void FunctionCallManager::bufferIncomingFunctionCall(const orxonox::FunctionCall& fctCall, uint32_t minGamestateID, uint32_t peerID)
    6665{
    67   FunctionCallManager::sIncomingFunctionCallBuffer_.push_back( std::make_pair(fctCall, std::make_pair(minGamestateID, peerID)));
     66  FunctionCallManager::sIncomingFunctionCallBuffer_.emplace_back(fctCall, std::make_pair(minGamestateID, peerID));
    6867}
    6968
    7069void FunctionCallManager::processBufferedFunctionCalls()
    7170{
    72   std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t> > >::iterator it = FunctionCallManager::sIncomingFunctionCallBuffer_.begin();
     71  std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t>>>::iterator it = FunctionCallManager::sIncomingFunctionCallBuffer_.begin();
    7372  while( it!=FunctionCallManager::sIncomingFunctionCallBuffer_.end() )
    7473  {
Note: See TracChangeset for help on using the changeset viewer.