Changeset 445 for trunk/src


Ignore:
Timestamp:
07/29/15 16:24:39 (10 years ago)
Author:
epyon
Message:
  • cleaning up string usage in lua (WIP)
  • cleaned up types.hh (WIP)
Location:
trunk/src/lua
Files:
2 edited

Legend:

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

    r440 r445  
    7878        string128 buffer;
    7979        bool dot = false;
    80         for ( const element& e : m_elements )
     80        for ( size_t c = 0; c < m_count; ++c )
    8181        {
    8282                if ( dot ) buffer.append( "." );
    83                 if ( e.length == 0 )
     83                if ( m_elements[c].length == 0 )
    8484                {
    85                         buffer.append( "["_ls + e.value + "]"_ls );
     85                        buffer.append( "["_ls + m_elements[c].value + "]"_ls );
    8686                        dot = false;
    8787                }
    8888                else
    8989                {
    90                         buffer.append( e.str, e.length );
     90                        buffer.append( m_elements[c].str, m_elements[c].length );
    9191                        dot = true;
    9292                }
  • trunk/src/lua/lua_values.cc

    r440 r445  
    106106}
    107107
    108 const char* nv::lua::detail::to_cstring ( lua_State *L, int index )
    109 {
    110         return lua_tolstring( L, index, nullptr );
    111 }
     108// const char* nv::lua::detail::to_cstring ( lua_State *L, int index )
     109// {
     110//      return lua_tolstring( L, index, nullptr );
     111// }
    112112
    113113nv::string_view nv::lua::detail::to_string_view( lua_State *L, int index )
     
    164164}
    165165
    166 const char* nv::lua::detail::to_cstring ( lua_State *L, int index, const char* def )
    167 {
    168         return ( lua_type( L, index ) == LUA_TSTRING ? lua_tostring( L, index ) : def );
    169 }
     166// const char* nv::lua::detail::to_cstring ( lua_State *L, int index, const char* def )
     167// {
     168//      return ( lua_type( L, index ) == LUA_TSTRING ? lua_tostring( L, index ) : def );
     169// }
    170170
    171171void*       nv::lua::detail::to_pointer ( lua_State *L, int index, void* def )
Note: See TracChangeset for help on using the changeset viewer.