Changeset 217 for trunk/src/object.cc
- Timestamp:
- 09/10/13 18:11:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/object.cc
r187 r217 16 16 17 17 object::object() 18 : m_root( nullptr ), m_id(), m_name(), m_uid(0), m_lua_index(lua::ref_none), m_parent( nullptr ), m_children(), m_child_count(0) 18 : m_root( nullptr ) 19 , m_id() 20 , m_name() 21 , m_uid(0) 22 , m_lua_index(lua::ref_none) 23 , m_lua_proto_index(lua::ref_none) 24 , m_parent( nullptr ) 25 , m_children() 26 , m_child_count(0) 19 27 { 20 28 } 21 29 22 30 object::object( root* aroot, const string& aid ) 23 : m_root( aroot ), m_id(aid), m_name(), m_uid( 0 ), m_lua_index(lua::ref_none), m_parent( nullptr ), m_children(), m_child_count(0) 31 : m_root( aroot ) 32 , m_id( aid ) 33 , m_name() 34 , m_uid(0) 35 , m_lua_index(lua::ref_none) 36 , m_lua_proto_index(lua::ref_none) 37 , m_parent( nullptr ) 38 , m_children() 39 , m_child_count(0) 24 40 { 25 41 if ( m_root ) … … 191 207 } 192 208 193 void nv::object::register_with_lua( const char* lua_name /*= nullptr*/)209 void nv::object::register_with_lua( const char* lua_name, const char* storage ) 194 210 { 195 211 lua::state* state = get_root()->get_lua_state(); … … 198 214 if ( lua_name != nullptr ) 199 215 { 200 m_lua_index = state->register_object( this, lua_name );201 } 202 else203 { 204 m_lua_ index = state->register_object( this);205 } 206 } 207 } 216 m_lua_index = state->register_object( this, lua_name ); 217 } 218 if ( storage != nullptr ) 219 { 220 m_lua_proto_index = state->register_proto( this, storage ); 221 } 222 } 223 }
Note: See TracChangeset
for help on using the changeset viewer.