]> granicus.if.org Git - transmission/commitdiff
(trunk qt) silence a couple of gcc warnings by adding reasonable defaults at the...
authorCharles Kerr <charles@transmissionbt.com>
Mon, 20 Sep 2010 13:46:08 +0000 (13:46 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 20 Sep 2010 13:46:08 +0000 (13:46 +0000)
qt/torrent-filter.cc
qt/torrent.cc

index ed620e140ec4532d708a04c749edc07aa653849f..c97ee15a8a05715863530c392d3ad8a6f0700869 100644 (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;
index f396ce13e9c48ecc129a1e28a8577a7154928def..f8884d4d40c5b2543045022062922e5fffc951e4 100644 (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;
     }