Ignore:
Timestamp:
01/24/17 17:55:00 (8 years ago)
Author:
epyon
Message:
  • temporary_proxy implemented
  • table_guard now uses temporary_proxy as main read functionality
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine/resource_system.cc

    r529 r539  
    2727        if ( do_clear ) clear();
    2828        lua::table_guard table( m_lua, get_storage_name() );
    29         uint32 count = table.get_unsigned( "__counter" );
     29        uint32 count = table["__counter"].get_uint32();
    3030        for ( auto i : range( count ) )
    3131        {
    3232                lua::table_guard sub_table( table, i + 1 );
    33                 load_resource( sub_table, sub_table.get_string_hash_64( "id" ) );
     33                shash64 id = sub_table["id"].get_shash64();
     34                load_resource( sub_table, id );
    3435        }
    3536}
     
    3940        m_id_hash.clear();
    4041        lua::table_guard table( m_lua, get_storage_name() );
    41         uint32 count = table.get_unsigned( "__counter" );
     42        uint32 count = table["__counter"].get_uint32();
    4243        for ( auto i : range( count ) )
    4344        {
    4445                lua::table_guard sub_table( table, i + 1 );
    45                 string64 id = sub_table.get_string64( "id" );
     46                string64 id = sub_table["id"].get_string64();
    4647                NV_ASSERT( m_id_hash.find( id ) == m_id_hash.end(), "HASH COLLISION" );
    4748                m_id_hash[id] = id;
Note: See TracChangeset for help on using the changeset viewer.