Skip to content

Commit

Permalink
Merge pull request #79004 from Brambor/remove-dead-code
Browse files Browse the repository at this point in the history
remove dead code
  • Loading branch information
GuardianDll authored Jan 8, 2025
2 parents 1f863b8 + b0306b5 commit 3b1ad40
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
16 changes: 0 additions & 16 deletions src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1712,22 +1712,6 @@ void Item_factory::add_actor( std::unique_ptr<iuse_actor> ptr )
iuse_function_list[ type ] = use_function( std::move( ptr ) );
}

void Item_factory::add_item_type( const itype &def )
{
if( m_runtimes.count( def.id ) > 0 ) {
// Do NOT allow overwriting it, it's undefined behavior
debugmsg( "Tried to add runtime type %s, but it exists already", def.id.c_str() );
return;
}

auto &new_item_ptr = m_runtimes[ def.id ];
new_item_ptr = std::make_unique<itype>( def );
if( frozen ) {
finalize_pre( *new_item_ptr );
finalize_post( *new_item_ptr );
}
}

void Item_factory::init()
{
add_iuse( "ACIDBOMB_ACT", &iuse::acidbomb_act );
Expand Down
7 changes: 0 additions & 7 deletions src/item_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,6 @@ class Item_factory
*/
const itype *find_template( const itype_id &id ) const;

/**
* Add a passed in itype to the collection of item types.
* If the item type overrides an existing type, the existing type is deleted first.
* @param def The new item type, must not be null.
*/
void add_item_type( const itype &def );

/**
* Check if an iuse is known to the Item_factory.
* @param type Iuse type id.
Expand Down

0 comments on commit 3b1ad40

Please sign in to comment.