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:
parent
8a81611d16
commit
f31186656c
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue