Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 12:25:29 PM (9 years ago)
Author:
landauf
Message:

NetworkFunctionBase doesn't have to inherit from Listable: there's a list of all instances stored in NetworkFunctionManager stored anyway

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/network/packet/FunctionIDs.cc

    r10468 r10470  
    5656
    5757  //calculate total needed size (for all strings and integers)
    58   ObjectList<NetworkFunctionBase>::iterator it;
    59   for(it = ObjectList<NetworkFunctionBase>::begin(); it; ++it)
     58  std::map<std::string, NetworkFunctionBase*>& map = NetworkFunctionManager::getNameMap();
     59  std::map<std::string, NetworkFunctionBase*>::iterator it;
     60  for (it = map.begin(); it != map.end(); ++it)
    6061  {
    61     const std::string& functionname = it->getName();
    62     networkID = it->getNetworkID();
     62    const std::string& functionname = it->second->getName();
     63    networkID = it->second->getNetworkID();
    6364    // now push the network id and the classname to the stack
    6465    tempQueue.push( std::pair<unsigned int, std::string>(networkID, functionname) );
Note: See TracChangeset for help on using the changeset viewer.