Changeset 11071 for code/trunk/src/libraries/network/packet/ClassID.cc
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (8 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/network/packet/ClassID.cc
r9667 r11071 52 52 uint32_t network_id; 53 53 flags_ = flags_ | PACKET_FLAGS_CLASSID; 54 std::queue<std::pair<uint32_t, std::string> 54 std::queue<std::pair<uint32_t, std::string>> tempQueue; 55 55 56 56 //calculate total needed size (for all strings and integers) 57 std::map<std::string, Identifier*>::const_iterator it = IdentifierManager::getInstance().getIdentifierByStringMap().begin(); 58 for(;it != IdentifierManager::getInstance().getIdentifierByStringMap().end();++it){ 59 id = it->second; 60 if(id == NULL || !id->hasFactory()) 57 for(const auto& mapEntry : IdentifierManager::getInstance().getIdentifierByStringMap()){ 58 id = mapEntry.second; 59 if(id == nullptr || !id->hasFactory()) 61 60 continue; 62 61 const std::string& classname = id->getName(); … … 71 70 //set the appropriate packet id 72 71 assert(this->data_); 73 *(Type ::Value*)(this->data_ + _PACKETID ) = Type::ClassID;72 *(Type *)(this->data_ + _PACKETID ) = Type::ClassID; 74 73 75 74 uint8_t *temp=data_+sizeof(uint32_t); … … 144 143 id=ClassByString( std::string((const char*)classname) ); 145 144 orxout(internal_info, context::packets) << "processing classid: " << networkID << " name: " << classname << " id: " << id << endl; 146 if(id== NULL){145 if(id==nullptr){ 147 146 orxout(user_error, context::packets) << "Received a bad classname" << endl; 148 147 abort();
Note: See TracChangeset
for help on using the changeset viewer.