Skip to content

Commit

Permalink
removed senseless function
Browse files Browse the repository at this point in the history
corrected comparison
  • Loading branch information
turleypol committed Mar 26, 2016
1 parent ece541b commit f59ae94
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 23 deletions.
10 changes: 5 additions & 5 deletions pol-core/pol/globals/uvars.cpp
Expand Up @@ -283,7 +283,7 @@ void GameState::cleanup_vars()
{
for ( auto& item : realm->zone[wx][wy].items )
{
world_delete( item );
item->destroy();
}
realm->zone[wx][wy].items.clear();
}
Expand All @@ -296,13 +296,13 @@ void GameState::cleanup_vars()
for ( auto& chr : realm->zone[wx][wy].characters )
{
chr->acct.clear(); // dave added 9/27/03, see above comment re: mutual references
world_delete( chr );
chr->destroy();
}
realm->zone[wx][wy].characters.clear();
for ( auto& chr : realm->zone[wx][wy].npcs )
{
chr->acct.clear(); // dave added 9/27/03, see above comment re: mutual references
world_delete( chr );
chr->destroy();
}
realm->zone[wx][wy].npcs.clear();
}
Expand All @@ -314,7 +314,7 @@ void GameState::cleanup_vars()
{
for ( auto& multi : realm->zone[wx][wy].multis )
{
world_delete( multi );
multi->destroy();
}
realm->zone[wx][wy].multis.clear();
}
Expand Down Expand Up @@ -609,4 +609,4 @@ GameState::Memory GameState::estimateSize() const
return usage;
}
}
}
}
2 changes: 1 addition & 1 deletion pol-core/pol/network/clientthread.cpp
Expand Up @@ -358,7 +358,7 @@ bool client_io_thread( Network::Client* client, bool login )
return false;
}

bool valid_message_length( Network::Client* client, int length )
bool valid_message_length( Network::Client* client, unsigned int length )
{
if ( length > sizeof client->buffer )
{
Expand Down
17 changes: 1 addition & 16 deletions pol-core/pol/ufunc.cpp
Expand Up @@ -1644,21 +1644,6 @@ void setrealmif( Item* item, void* arg )
item->realm = realm->baserealm;
}

void world_delete( UObject* uobj )
{
uobj->destroy();
/* moved to UObject::destroy()
uobj->serial = 0;
uobj->serial_ext = 0;
passert( uobj->count() >= 1 );
ref_ptr<UObject> ref( uobj );
uobj->release();
*/
}

void subtract_amount_from_item( Item* item, unsigned short amount )
{
if ( amount >= item->getamount() )
Expand Down Expand Up @@ -2305,4 +2290,4 @@ void send_buff_message( Character* chr, u16 icon, bool show, u16 duration, u32 c
msg.Send( chr->client, len );
}
}
}
}
1 change: 0 additions & 1 deletion pol-core/pol/ufunc.h
Expand Up @@ -219,7 +219,6 @@ void transmit_to_inrange( const UObject* center, const void* msg, unsigned msgle
void transmit_to_others_inrange( Mobile::Character* center, const void* msg, unsigned msglen );

void destroy_item( Items::Item* item );
void world_delete( UObject* uobj );

void move_item( Items::Item* item, UFACING facing );
void move_item( Items::Item* item, unsigned short newx, unsigned short newy, signed char newz,
Expand Down

0 comments on commit f59ae94

Please sign in to comment.