From 129ed048d87c456df400cc38166df5aed3d0b5bf Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 11 Apr 2014 16:04:36 +0000 Subject: [PATCH] build fix for wxUSE_VALIDATORS==0 when NULL is defined to be nullptr casting nullptr is not allowed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/validate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wx/validate.h b/include/wx/validate.h index 0adf3bf477..2a67766dbc 100644 --- a/include/wx/validate.h +++ b/include/wx/validate.h @@ -104,7 +104,8 @@ extern WXDLLIMPEXP_DATA_CORE(const wxValidator) wxDefaultValidator; // a wxValidator parameter to avoid using "#if wxUSE_VALIDATORS" // everywhere class WXDLLIMPEXP_FWD_CORE wxValidator; - #define wxDefaultValidator (*reinterpret_cast(NULL)) + static const wxValidator* wxDefaultValidatorPtr = NULL; + #define wxDefaultValidator (*wxDefaultValidatorPtr) // this macro allows to avoid warnings about unused parameters when // wxUSE_VALIDATORS == 0