From 84e2492ea4f980e7b02d6d296b5a4ebccf272a90 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 6 Dec 2015 19:44:15 +0100 Subject: [PATCH] Handle all wxCalendarHitTestResult elements in a switch This ensures that the compiler will warn us if a new wxCAL_HITTEST_XXX is added but forgotten to be handled here. --- src/generic/calctrlg.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/generic/calctrlg.cpp b/src/generic/calctrlg.cpp index ed2f38ddfa..a03cfbd4da 100644 --- a/src/generic/calctrlg.cpp +++ b/src/generic/calctrlg.cpp @@ -1339,8 +1339,12 @@ void wxGenericCalendarCtrl::OnDClick(wxMouseEvent& event) SetDateAndNotify(date); break; - default: + case wxCAL_HITTEST_WEEK: + case wxCAL_HITTEST_HEADER: + case wxCAL_HITTEST_SURROUNDING_WEEK: + case wxCAL_HITTEST_NOWHERE: event.Skip(); + break; } }