Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2015, 11:22:03 PM (9 years ago)
Author:
landauf
Message:

use actual types instead of 'auto'. only exception is for complicated template types, e.g. when iterating over a map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/network/Host.cc

    r10821 r10916  
    8080  void Host::addPacket(ENetPacket *packet, int clientID, uint8_t channelID)
    8181  {
    82     for(auto & instances_ : instances_s)
     82    for(Host* host : instances_s)
    8383    {
    84       if( (instances_)->isActive() )
     84      if( host->isActive() )
    8585      {
    86         (instances_)->queuePacket(packet, clientID, channelID);
     86        host->queuePacket(packet, clientID, channelID);
    8787      }
    8888    }
     
    9797  void Host::sendChat(const std::string& message, unsigned int sourceID, unsigned int targetID)
    9898  {
    99     for(auto & instances_ : instances_s)
    100       if( (instances_)->isActive() )
    101         (instances_)->doSendChat(message, sourceID, targetID);
     99    for(Host* host : instances_s)
     100      if( host->isActive() )
     101        host->doSendChat(message, sourceID, targetID);
    102102  }
    103103
     
    114114  bool Host::isServer()
    115115  {
    116     for (auto & instances_ : instances_s)
     116    for (Host* host : instances_s)
    117117    {
    118       if( (instances_)->isActive() )
     118      if( host->isActive() )
    119119      {
    120         if( (instances_)->isServer_() )
     120        if( host->isServer_() )
    121121          return true;
    122122      }
Note: See TracChangeset for help on using the changeset viewer.