]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove unnecessary default from a switch statement.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 8 Dec 2012 00:37:36 +0000 (00:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 8 Dec 2012 00:37:36 +0000 (00:37 +0000)
Don't check for impossible enum element value, it's better to not have the
default clause at all to get a warning from g++ if this enum ever changes
later. And for now the presence of default results in a warning from Coverity
about unreachable code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/image.cpp

index 2c61998e6d3c226b9822dcd4750d60a75f2b61a9..66caa0817407120ca1f428cfc2bbf756c31d11b9 100644 (file)
@@ -2880,10 +2880,6 @@ wxImage::HSVValue wxImage::RGBtoHSV(const RGBValue& rgb)
             case BLUE:
                 hue = 4.0 + (red - green) / deltaRGB;
                 break;
-
-            default:
-                wxFAIL_MSG(wxT("hue not specified"));
-                break;
         }
 
         hue /= 6.0;