From 97cffad5942301d3b309087d1a7dec3d339d5c7c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Jun 2005 12:10:48 +0000 Subject: [PATCH] use pragma warning push/pop under MSVC instead of enabling temporarily disabled warnings unconditionally (patch 1207689) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 3 ++- include/wx/generic/scrolwin.h | 3 ++- include/wx/rawbmp.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index 9694f3e81a..eecc4cd980 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -514,6 +514,7 @@ private: #ifdef __VISUALC__ // 'this' : used in base member initializer list (for m_commandString) + #pragma warning(push) #pragma warning(disable:4355) #endif @@ -580,7 +581,7 @@ private: }; #ifdef __VISUALC__ - #pragma warning(default:4355) + #pragma warning(pop) #endif #if WXWIN_COMPATIBILITY_2_4 diff --git a/include/wx/generic/scrolwin.h b/include/wx/generic/scrolwin.h index c7ecc79bf1..801711d6ab 100644 --- a/include/wx/generic/scrolwin.h +++ b/include/wx/generic/scrolwin.h @@ -32,6 +32,7 @@ extern WXDLLEXPORT_DATA(const wxChar*) wxPanelNameStr; // avoid triggering this stupid VC++ warning #ifdef __VISUALC__ + #pragma warning(push) #pragma warning(disable:4355) // 'this' used in base member initializer list #endif @@ -96,7 +97,7 @@ private: }; #ifdef __VISUALC__ - #pragma warning(default:4355) + #pragma warning(pop) #endif #endif diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index 43e20ab6ed..8901f1b2f3 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -73,6 +73,7 @@ #ifdef __VISUALC__ // VC++ gives an absolutely harmless warning for wxPixelData ctor + #pragma warning(push) #pragma warning(disable: 4355) // 'this' used in initializer list #endif @@ -717,8 +718,7 @@ struct wxPixelIterator : wxPixelData::Iterator }; #ifdef __VISUALC__ - #pragma warning(default: 4355) - #pragma warning(default: 4097) + #pragma warning(pop) #endif #endif // _WX_RAWBMP_H_BASE_ -- 2.45.2