Changeset 433 for trunk/src/lua


Ignore:
Timestamp:
07/21/15 19:40:00 (10 years ago)
Author:
epyon
Message:
  • string.hh split into separate files
  • string.hh - removed std::string conversions (header still stays though)
Location:
trunk/src/lua
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lua/lua_function.cc

    r406 r433  
    2121        {
    2222                lua_pop( L, 1 );
    23                 NV_LUA_ABORT( "function_base::function_base", "not a valid path - ", a_path.to_string() );
     23                NV_LUA_ABORT( "function_base::function_base", "not a valid path - ", a_path.to_string().c_str() );
    2424        }
    2525
     
    2727        {
    2828                lua_pop( L, 1 );
    29                 NV_LUA_ABORT( "function_base::function_base", "not a valid function - ", a_path.to_string() );
     29                NV_LUA_ABORT( "function_base::function_base", "not a valid function - ", a_path.to_string().c_str() );
    3030        }
    3131        m_ref = luaL_ref( L, LUA_REGISTRYINDEX );
  • trunk/src/lua/lua_map_tile.cc

    r406 r433  
    5555        nv::map_area* map_area = nv::lua::detail::to_map_area( L, 3 );
    5656        lua_settop( L, 2 );
    57         std::string code = nv::trimmed( lua_tostring( L, 1 ) ).to_string();
     57        nv::string_view lts = nv::trimmed( lua_tostring( L, 1 ) );
     58        std::string code( lts.data(), lts.size() );
    5859        std::string chars( " \r\t" );
    5960        code.erase( nv::remove_if( code.begin(), code.end(),
  • trunk/src/lua/lua_state.cc

    r431 r433  
    116116        if ( !p.resolve( m_state, global ) )
    117117        {
    118                 NV_LOG_ERROR( "Lua error : not a valid path - ", p.to_string() );
     118                NV_LOG_ERROR( "Lua error : not a valid path - ", p.to_string().c_str() );
    119119                return false;
    120120        }
     
    123123        {
    124124                lua_pop( m_state, 1 );
    125                 NV_LOG_ERROR( "Lua error : not a valid function - ", p.to_string() );
     125                NV_LOG_ERROR( "Lua error : not a valid function - ", p.to_string().c_str() );
    126126                return false;
    127127        }
     
    442442        for ( int i = 0; i < top; ++i )
    443443        {
    444                 NV_LOG_DEBUG( "#", i+1, " - ", lua_typename(m_state, lua_type(m_state, i+1) ), " = ", nlua_typecontent(m_state, i+1) );
     444                NV_LOG_DEBUG( "#", i+1, " - ", lua_typename(m_state, lua_type(m_state, i+1) ), " = ", nlua_typecontent(m_state, i+1).c_str() );
    445445        }
    446446}
Note: See TracChangeset for help on using the changeset viewer.