- Timestamp:
- Jan 10, 2016, 1:54:11 PM (9 years ago)
- Location:
- code/branches/cpp11_v3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3
- Property svn:mergeinfo changed
-
code/branches/cpp11_v3/src/libraries/network/FunctionCallManager.cc
r10624 r11054 37 37 38 38 std::map<uint32_t, packet::FunctionCalls*> FunctionCallManager::sPeerMap_; 39 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t> >> FunctionCallManager::sIncomingFunctionCallBuffer_;39 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t>>> FunctionCallManager::sIncomingFunctionCallBuffer_; 40 40 41 41 … … 54 54 void FunctionCallManager::sendCalls(orxonox::Host* host) 55 55 { 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_ ) 58 57 { 59 58 assert(!FunctionCallManager::sPeerMap_.empty()); 60 it->second->send(host);59 mapEntry.second->send(host); 61 60 } 62 61 FunctionCallManager::sPeerMap_.clear(); … … 65 64 void FunctionCallManager::bufferIncomingFunctionCall(const orxonox::FunctionCall& fctCall, uint32_t minGamestateID, uint32_t peerID) 66 65 { 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)); 68 67 } 69 68 70 69 void FunctionCallManager::processBufferedFunctionCalls() 71 70 { 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(); 73 72 while( it!=FunctionCallManager::sIncomingFunctionCallBuffer_.end() ) 74 73 {
Note: See TracChangeset
for help on using the changeset viewer.