Changeset 441 for trunk/src/lua/lua_map_tile.cc
- Timestamp:
- 07/24/15 11:13:32 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lua/lua_map_tile.cc
r440 r441 17 17 #include "nv/lua/lua_raw.hh" 18 18 19 // TODO: REMOVE20 #include <string>21 22 19 static const char* NLUA_MAP_TILE_METATABLE = "map_tile"; 23 20 … … 58 55 nv::map_area* map_area = nv::lua::detail::to_map_area( L, 3 ); 59 56 lua_settop( L, 2 ); 60 nv::string_view lts = nv::trimmed( lua_tostring( L, 1 ) ); 61 std::string code( lts.data(), lts.size() ); 62 std::string chars( " \r\t" ); 57 nv::string_buffer code( nv::trimmed( lua_tostring( L, 1 ) ) ); 58 nv::string_view chars( " \r\t" ); 63 59 code.erase( nv::remove_if( code.begin(), code.end(), 64 60 [&chars] ( const char& c ) 65 61 { 66 return chars.find( c ) != std::string::npos;62 return chars.find( c ) != nv::string_view::npos; 67 63 } ), code.end() ); 68 64
Note: See TracChangeset
for help on using the changeset viewer.