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/core/input/InputBuffer.cc

    r10821 r10916  
    110110    void InputBuffer::insert(const std::string& input, bool update)
    111111    {
    112         for (auto & elem : input)
    113         {
    114             this->insert(elem, false);
     112        for (const char& inputChar : input)
     113        {
     114            this->insert(inputChar, false);
    115115
    116116            if (update)
    117                 this->updated(elem, false);
     117                this->updated(inputChar, false);
    118118        }
    119119
     
    170170    void InputBuffer::updated()
    171171    {
    172         for (auto & elem : this->listeners_)
    173         {
    174             if ((elem)->bListenToAllChanges_)
    175                 (elem)->callFunction();
     172        for (BaseInputBufferListenerTuple* listener : this->listeners_)
     173        {
     174            if (listener->bListenToAllChanges_)
     175                listener->callFunction();
    176176        }
    177177    }
     
    179179    void InputBuffer::updated(const char& update, bool bSingleInput)
    180180    {
    181         for (auto & elem : this->listeners_)
    182         {
    183             if ((!(elem)->trueKeyFalseChar_) && ((elem)->bListenToAllChanges_ || ((elem)->char_ == update)) && (!(elem)->bOnlySingleInput_ || bSingleInput))
    184                 (elem)->callFunction();
     181        for (BaseInputBufferListenerTuple* listener : this->listeners_)
     182        {
     183            if ((!listener->trueKeyFalseChar_) && (listener->bListenToAllChanges_ || (listener->char_ == update)) && (!listener->bOnlySingleInput_ || bSingleInput))
     184                listener->callFunction();
    185185        }
    186186    }
     
    201201            return;
    202202
    203         for (auto & elem : this->listeners_)
    204         {
    205             if ((elem)->trueKeyFalseChar_ && ((elem)->key_ == evt.getKeyCode()))
    206                 (elem)->callFunction();
     203        for (BaseInputBufferListenerTuple* listener : this->listeners_)
     204        {
     205            if (listener->trueKeyFalseChar_ && (listener->key_ == evt.getKeyCode()))
     206                listener->callFunction();
    207207        }
    208208
Note: See TracChangeset for help on using the changeset viewer.