1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 11:23:40 +00:00

(trunk qt) silence a couple of gcc warnings by adding reasonable defaults at the bottom of a switch statement in case bad tr_ratiolimits or FilterModes get used in the switch

This commit is contained in:
Charles Kerr 2010-09-20 13:46:08 +00:00
parent 8a81611d16
commit f31186656c
2 changed files with 4 additions and 4 deletions

View file

@ -144,9 +144,6 @@ TorrentFilter :: activityFilterAcceptsTorrent( const Torrent * tor, const Filter
switch( m.mode( ) )
{
case FilterMode::SHOW_ALL:
accepts = true;
break;
case FilterMode::SHOW_ACTIVE:
accepts = tor->peersWeAreUploadingTo( ) > 0 || tor->peersWeAreDownloadingFrom( ) > 0 || tor->isVerifying( );
break;
@ -171,6 +168,9 @@ TorrentFilter :: activityFilterAcceptsTorrent( const Torrent * tor, const Filter
case FilterMode::SHOW_ERROR:
accepts = tor->hasError( );
break;
default: // FilterMode::SHOW_ALL
accepts = true;
break;
}
return accepts;

View file

@ -342,7 +342,7 @@ Torrent :: getSeedRatio( double& ratio ) const
ratio = myPrefs.getDouble( Prefs :: RATIO );
break;
case TR_RATIOLIMIT_UNLIMITED:
default: // TR_RATIOLIMIT_UNLIMITED:
isLimited = false;
break;
}