From: Vadim Zeitlin Date: Fri, 15 Jun 2012 23:23:14 +0000 (+0000) Subject: Fix harmless MSVC warning about converting pointer to bool. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/568fb7e9f636a85356e379fa543a7d233634b370 Fix harmless MSVC warning about converting pointer to bool. Compare the pointer with NULL explicitly to avoid "forcing value to bool" warning C4800 from MSVC in richtext code. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextstylepage.cpp b/src/richtext/richtextstylepage.cpp index bb646168a3..2d403075e4 100644 --- a/src/richtext/richtextstylepage.cpp +++ b/src/richtext/richtextstylepage.cpp @@ -310,7 +310,7 @@ wxIcon wxRichTextStylePage::GetIconResource( const wxString& name ) void wxRichTextStylePage::OnNextStyleUpdate( wxUpdateUIEvent& event ) { wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this); - event.Enable(wxDynamicCast(def, wxRichTextParagraphStyleDefinition)); + event.Enable(wxDynamicCast(def, wxRichTextParagraphStyleDefinition) != NULL); } #endif // wxUSE_RICHTEXT