]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mousestate.h
Dramatically optimise inserting many items in wxGenericListCtrl.
[wxWidgets.git] / include / wx / mousestate.h
index 21eee5cb0edea854192ce24d160b82f5d5814ca5..f338ea55d9dae0ac84f1f5f03f7d0931b0511bb4 100644 (file)
@@ -79,10 +79,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,6 +97,15 @@ public:
 
             case wxMOUSE_BTN_AUX2:
                 return Aux2IsDown();
+
+            case wxMOUSE_BTN_NONE:
+            case wxMOUSE_BTN_MAX:
+                wxFAIL_MSG(wxS("invalid parameter"));
+                return false;
+
+            default:
+                wxFAIL_MSG(wxS("unknown parameter"));
+                return false;
         }
     }