Ignore:
Timestamp:
07/23/15 21:16:01 (10 years ago)
Author:
epyon
Message:
  • massive std::string removal
  • no header depends on std::string anymore (or any other STL header)
  • still some code files do (WIP)
  • massive refactoring where std::string was used
  • lua still messy (grep for string128 - used everywhere)
  • string_twine added
File:
1 edited

Legend:

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

    r399 r440  
    6565}
    6666
    67 void nv::lua::detail::push_string  ( lua_State *L, const std::string& s )
    68 {
    69         lua_pushlstring( L, s.c_str(), s.size() );
    70 }
    71 
    7267void nv::lua::detail::push_cstring ( lua_State *L, const char* s )
    7368{
     
    109104{
    110105        return lua_toboolean( L, index ) != 0;
    111 }
    112 
    113 std::string nv::lua::detail::to_string  ( lua_State *L, int index )
    114 {
    115         size_t length = 0;
    116         const char* result = lua_tolstring( L, index, &length );
    117         return std::string( result, length );
    118106}
    119107
     
    171159}
    172160
    173 std::string nv::lua::detail::to_string  ( lua_State *L, int index, const std::string& def )
     161nv::string_view nv::lua::detail::to_string_view( lua_State *L, int index, string_view def )
    174162{
    175         return ( lua_type( L, index ) == LUA_TSTRING ? lua_tostring( L, index ) : def );
     163        return ( lua_type( L, index ) == LUA_TSTRING ? nlua_tostringview( L, index ) : def );
    176164}
    177165
Note: See TracChangeset for help on using the changeset viewer.