Migrated some more data structures to the STL. Removed some ad-hoc data structure implementations.

This commit is contained in:
ridiculousfish
2011-12-26 21:50:23 -08:00
parent 7c7aba1202
commit 28ecc68841
3 changed files with 4 additions and 284 deletions

View File

@@ -322,7 +322,7 @@ static void broadcast( int type, const wchar_t *key, const wchar_t *val )
for( c = conn; c; c=c->next )
{
msg->count++;
q_put( &c->unsent, msg );
c->unsent->push(msg);
}
for( c = conn; c; c=c->next )
@@ -738,9 +738,10 @@ int main( int argc, char ** argv )
{
debug( 4, L"Close connection %d", c->fd );
while( !q_empty( &c->unsent ) )
while( ! c->unsent->empty()) )
{
message_t *msg = (message_t *)q_get( &c->unsent );
message_t *msg = c->unsent->front();
c->unsent->pop();
msg->count--;
if( !msg->count )
free( msg );