From e851db7e9eefe07a20cbeea3c09a3fae0771f82d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Apr 2017 22:59:54 +0200 Subject: [PATCH] Avoid -Wexpansion-to-defined clang warning in wxOSX Define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA as either 0 or 1 instead of using an expression involving "defined" for it as the latter provoked many clang -Wexpansion-to-defined warnings, which were harmless but very annoying. --- include/wx/generic/colrdlgg.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/wx/generic/colrdlgg.h b/include/wx/generic/colrdlgg.h index 10657529ed..fa74b0107a 100644 --- a/include/wx/generic/colrdlgg.h +++ b/include/wx/generic/colrdlgg.h @@ -21,9 +21,12 @@ // Preview with opacity is possible only if wxGCDC and wxStaticBitmap are // available and currently it only works in wxOSX and wxMSW as it uses wxBitmap // UseAlpha() and HasAlpha() methods which only these ports provide. -#define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA \ - ((wxUSE_GRAPHICS_CONTEXT && wxUSE_STATBMP) && \ +#if ((wxUSE_GRAPHICS_CONTEXT && wxUSE_STATBMP) && \ (defined(__WXMSW__) || defined(__WXOSX__))) + #define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA 1 +#else + #define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA 0 +#endif #if wxCLRDLGG_USE_PREVIEW_WITH_ALPHA class wxStaticBitmap;