]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix harmless Clang warning about unreachable code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 May 2013 23:04:08 +0000 (23:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 May 2013 23:04:08 +0000 (23:04 +0000)
Unfortunately Clang intelligent flow analysis prevents us from using different
asserts for invalid parameter value and unhandled one, which could happen if
more elements are added to wxMouseButton enum in the future.

Closes #15201.

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

include/wx/mousestate.h

index 98ab291baf72cece641d8e233fe33c7de677b55a..8e954ad371742d5007976d818368d285af392b64 100644 (file)
@@ -100,13 +100,11 @@ public:
 
             case wxMOUSE_BTN_NONE:
             case wxMOUSE_BTN_MAX:
-                wxFAIL_MSG(wxS("invalid parameter"));
-                return false;
-
-            default:
-                wxFAIL_MSG(wxS("unknown parameter"));
-                return false;
+                break;
         }
+
+        wxFAIL_MSG(wxS("invalid parameter"));
+        return false;
     }