From 77df51f4fb0822bedc13263af625d50c15ba7abc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Oct 2005 22:34:08 +0000 Subject: [PATCH] disable VC++ warning 4355 in wx/defs.h once and for all instead of doing it in 4 different places git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 11 +++-------- include/wx/event.h | 12 ------------ include/wx/generic/scrolwin.h | 15 +-------------- include/wx/rawbmp.h | 18 ------------------ 4 files changed, 4 insertions(+), 52 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 48561360f0..674b4db3e1 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -65,18 +65,13 @@ #ifdef __VISUALC__ /* the only "real" warning here is 4244 but there are just too many of them */ /* in our code... one day someone should go and fix them but until then... */ +# pragma warning(disable:4097) /* typedef used as class */ # pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ # pragma warning(disable:4244) /* conversion from double to float */ -# pragma warning(disable:4710) /* function not inlined */ -# pragma warning(disable:4097) /* typedef used as class */ +# pragma warning(disable:4355) /* 'this' used in base member initializer list */ # pragma warning(disable:4511) /* copy ctor couldn't be generated */ # pragma warning(disable:4512) /* operator=() couldn't be generated */ -#ifndef WIN32 -# pragma warning(disable:4135) /* conversion between different integral types */ -# pragma warning(disable:4769) /* assignment of near pointer to long integer */ -/* This one is really annoying, since it occurs for each cast to (HANDLE)... */ -# pragma warning(disable:4305) /* truncation of long to near ptr */ -#endif +# pragma warning(disable:4710) /* function not inlined */ #endif /* __VISUALC__ */ /* suppress some Salford C++ warnings */ diff --git a/include/wx/event.h b/include/wx/event.h index 939e8fce1e..11cbcd1fc3 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -504,14 +504,6 @@ private: }; #endif -#ifdef __VISUALC__ - // 'this' : used in base member initializer list (for m_commandString) - #if _MSC_VER > 1100 - #pragma warning(push) - #endif - #pragma warning(disable:4355) -#endif - class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent { public: @@ -574,10 +566,6 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent) }; -#if defined(__VISUALC__) && (_MSC_VER > 1100) - #pragma warning(pop) -#endif - #if WXWIN_COMPATIBILITY_2_4 inline void wxCommandEventStringHelper::operator=(const wxString &str) { diff --git a/include/wx/generic/scrolwin.h b/include/wx/generic/scrolwin.h index 2163b7141d..5586fd5a3c 100644 --- a/include/wx/generic/scrolwin.h +++ b/include/wx/generic/scrolwin.h @@ -26,14 +26,6 @@ extern WXDLLEXPORT_DATA(const wxChar*) wxPanelNameStr; #define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL) #endif -// avoid triggering this stupid VC++ warning -#ifdef __VISUALC__ - #if _MSC_VER > 1100 - #pragma warning(push) - #endif - #pragma warning(disable:4355) // 'this' used in base member initializer list -#endif - // ---------------------------------------------------------------------------- // wxGenericScrolledWindow // ---------------------------------------------------------------------------- @@ -94,10 +86,5 @@ private: DECLARE_EVENT_TABLE() }; -#if defined(__VISUALC__) && (_MSC_VER > 1100) - #pragma warning(pop) -#endif - -#endif - // _WX_GENERIC_SCROLLWIN_H_ +#endif // _WX_GENERIC_SCROLLWIN_H_ diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index 1595183e51..db4c014d15 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -71,12 +71,6 @@ } */ -#ifdef __VISUALC__ - // VC++ gives an absolutely harmless warning for wxPixelData ctor - #pragma warning(push) - #pragma warning(disable: 4355) // 'this' used in initializer list -#endif - /* Note: we do not use WXDLLEXPORT with classes in this file because VC++ has problems with exporting inner class defined inside a specialization of a @@ -658,14 +652,6 @@ struct wxPixelDataOut }; #endif //wxUSE_GUI -#ifdef __VISUALC__ - // typedef-name 'foo' used as synonym for class-name 'bar' - // (VC++ gives this warning each time wxPixelData::Base is used but it - // doesn't make any sense here -- what's wrong with using typedef instead - // of class, this is what it is here for!) - #pragma warning(disable: 4097) -#endif // __VISUALC__ - template > class wxPixelData : public wxPixelDataOut::template wxPixelDataIn @@ -717,9 +703,5 @@ struct wxPixelIterator : public wxPixelData::Iterator { }; -#ifdef __VISUALC__ - #pragma warning(pop) -#endif - #endif // _WX_RAWBMP_H_BASE_ -- 2.45.2