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/LuaState.cc

    r10852 r10916  
    326326    /*static*/ bool LuaState::addToluaInterface(int (*function)(lua_State*), const std::string& name)
    327327    {
    328         for (const auto & interface : getToluaInterfaces())
    329         {
    330             if (interface.first == name || interface.second == function)
     328        for (const auto& mapEntry : getToluaInterfaces())
     329        {
     330            if (mapEntry.first == name || mapEntry.second == function)
    331331            {
    332332                orxout(internal_warning, context::lua) << "Trying to add a Tolua interface with the same name or function." << endl;
     
    337337
    338338        // Open interface in all LuaStates
    339         for (const auto & state : getInstances())
     339        for (LuaState* state : getInstances())
    340340            (*function)(state->luaState_);
    341341
     
    354354
    355355        // Close interface in all LuaStates
    356         for (const auto & state : getInstances())
     356        for (LuaState* state : getInstances())
    357357        {
    358358            lua_pushnil(state->luaState_);
     
    369369    /*static*/ void LuaState::openToluaInterfaces(lua_State* state)
    370370    {
    371         for (const auto & interface : getToluaInterfaces())
    372             (interface.second)(state);
     371        for (const auto& mapEntry : getToluaInterfaces())
     372            (mapEntry.second)(state);
    373373    }
    374374
    375375    /*static*/ void LuaState::closeToluaInterfaces(lua_State* state)
    376376    {
    377         for (const auto & interface : getToluaInterfaces())
     377        for (const auto& mapEntry : getToluaInterfaces())
    378378        {
    379379            lua_pushnil(state);
    380             lua_setglobal(state, interface.first.c_str());
     380            lua_setglobal(state, mapEntry.first.c_str());
    381381        }
    382382    }
Note: See TracChangeset for help on using the changeset viewer.