From b5c18cfec45a4ca938699c457ff4463439a58e62 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Aug 2014 15:32:10 +0000 Subject: [PATCH] Avoid unused variable warnings in !wxDEBUG_LEVEL builds. Don't define a constant which is only used inside wxASSERT() at all if debug checks are disabled. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/sizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 08045e5b41..18c06c0da4 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -89,6 +89,8 @@ WX_DEFINE_EXPORTED_LIST( wxSizerItemList ) // ---------------------------------------------------------------------------- // check for flags conflicts +#if wxDEBUG_LEVEL + static const int SIZER_FLAGS_MASK = wxADD_FLAG(wxCENTRE, wxADD_FLAG(wxHORIZONTAL, @@ -110,6 +112,8 @@ static const int SIZER_FLAGS_MASK = wxADD_FLAG(wxSHAPED, 0)))))))))))))))))); +#endif // wxDEBUG_LEVEL + #define ASSERT_VALID_SIZER_FLAGS(f) wxASSERT_VALID_FLAGS(f, SIZER_FLAGS_MASK)