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

Location:
code/branches/cpp11_v2/src/modules/objects/eventsystem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/objects/eventsystem/EventDispatcher.cc

    r10821 r10916  
    4545    {
    4646        if (this->isInitialized())
    47             for (auto & elem : this->targets_)
    48                 (elem)->destroy();
     47            for (BaseObject* target : this->targets_)
     48                target->destroy();
    4949    }
    5050
     
    6161    void EventDispatcher::processEvent(Event& event)
    6262    {
    63         for (auto & elem : this->targets_)
    64             (elem)->processEvent(event);
     63        for (BaseObject* target : this->targets_)
     64            target->processEvent(event);
    6565    }
    6666
     
    7373    {
    7474        unsigned int i = 0;
    75         for (const auto & elem : this->targets_)
     75        for (BaseObject* target : this->targets_)
    7676        {
    7777            if (i == index)
    78                 return (elem);
     78                return target;
    7979            ++i;
    8080        }
  • code/branches/cpp11_v2/src/modules/objects/eventsystem/EventFilter.cc

    r10821 r10916  
    9696    {
    9797        unsigned int i = 0;
    98         for (const auto & elem : this->sources_)
     98        for (BaseObject* source : this->sources_)
    9999        {
    100100            if (i == index)
    101                 return (elem);
     101                return source;
    102102            ++i;
    103103        }
     
    113113    {
    114114        unsigned int i = 0;
    115         for (const auto & elem : this->names_)
     115        for (EventName* name : this->names_)
    116116        {
    117117            if (i == index)
    118                 return (elem);
     118                return name;
    119119            ++i;
    120120        }
Note: See TracChangeset for help on using the changeset viewer.