X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c9039c352009b729886e30c7537ab74b0d6d2ef..e91e1e3d5cab263883c1cee1689c898b8f7c4ecd:/include/wx/mousestate.h diff --git a/include/wx/mousestate.h b/include/wx/mousestate.h index 21eee5cb0e..2ea1cc5bf1 100644 --- a/include/wx/mousestate.h +++ b/include/wx/mousestate.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxMouseState class // Author: Vadim Zeitlin // Created: 2008-09-19 (extracted from wx/utils.h) -// RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -79,10 +78,6 @@ public: { switch ( but ) { - default: - wxFAIL_MSG(wxT("invalid parameter in wxMouseState::ButtonIsDown")); - // fall through - case wxMOUSE_BTN_ANY: return LeftIsDown() || MiddleIsDown() || RightIsDown() || Aux1IsDown() || Aux2IsDown(); @@ -101,7 +96,14 @@ public: case wxMOUSE_BTN_AUX2: return Aux2IsDown(); + + case wxMOUSE_BTN_NONE: + case wxMOUSE_BTN_MAX: + break; } + + wxFAIL_MSG(wxS("invalid parameter")); + return false; } @@ -123,7 +125,7 @@ public: // version of wxMouseState but their names are confusing as wxMouseEvent // has methods with the same names which do something quite different so // don't use them any more -#ifdef WXWIN_COMPATIBILITY_2_8 +#if WXWIN_COMPATIBILITY_2_8 wxDEPRECATED_INLINE(bool LeftDown() const, return LeftIsDown(); ) wxDEPRECATED_INLINE(bool MiddleDown() const, return MiddleIsDown(); ) wxDEPRECATED_INLINE(bool RightDown() const, return RightIsDown(); )