From: Vadim Zeitlin Date: Sun, 12 May 2013 23:04:08 +0000 (+0000) Subject: Fix harmless Clang warning about unreachable code. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dc8cd788c068143657b9b5e784ac62a3e50b99d6 Fix harmless Clang warning about unreachable code. 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 --- diff --git a/include/wx/mousestate.h b/include/wx/mousestate.h index 98ab291baf..8e954ad371 100644 --- a/include/wx/mousestate.h +++ b/include/wx/mousestate.h @@ -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; }