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/modules/questsystem/Quest.cc

    r10821 r10916  
    190190
    191191        // Iterate through all subquests.
    192         for (const auto & elem : this->subQuests_)
     192        for (Quest* quest : this->subQuests_)
    193193        {
    194194            if(i == 0) // We're counting down...
    195                return elem;
     195               return quest;
    196196
    197197            i--;
     
    214214
    215215        // Iterate through all QuestHints.
    216         for (const auto & elem : this->hints_)
     216        for (QuestHint* hint : this->hints_)
    217217        {
    218218            if(i == 0) // We're counting down...
    219                return elem;
     219               return hint;
    220220
    221221            i--;
     
    237237
    238238        // Iterate through all fail QuestEffects.
    239         for (const auto & elem : this->failEffects_)
     239        for (QuestEffect* effect : this->failEffects_)
    240240        {
    241241            if(i == 0) // We're counting down...
    242                return elem;
     242               return effect;
    243243
    244244            i--;
     
    260260
    261261        // Iterate through all complete QuestEffects.
    262         for (const auto & elem : this->completeEffects_)
     262        for (QuestEffect* effect : this->completeEffects_)
    263263        {
    264264            if(i == 0) // We're counting down...
    265                return elem;
     265               return effect;
    266266
    267267            i--;
Note: See TracChangeset for help on using the changeset viewer.