Remove obsolete MSVC version tests.

Don't compare __VISUALC__ with versions 1200 (VC6) and earlier, such tests are
always true or always false now that we don't support VC6 any more, so just
remove them simplifying the code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-05-16 13:01:29 +00:00
parent 15f255cebb
commit 8c7d31e615
15 changed files with 25 additions and 149 deletions

View File

@@ -18,24 +18,7 @@
// undo what we did in wx/beforestd.h // undo what we did in wx/beforestd.h
#if defined(__VISUALC__) && __VISUALC__ <= 1201 #if defined(__VISUALC__) && __VISUALC__ <= 1201
// MSVC 5 does not have this
#if _MSC_VER > 1100
#pragma warning(pop) #pragma warning(pop)
#else
// 'expression' : signed/unsigned mismatch
#pragma warning(default:4018)
// 'identifier' : unreferenced formal parameter
#pragma warning(default:4100)
// 'conversion' : conversion from 'type1' to 'type2',
// possible loss of data
#pragma warning(default:4244)
// C++ language change: to explicitly specialize class template
// 'identifier' use the following syntax
#pragma warning(default:4663)
#endif
#endif #endif
// see beforestd.h for explanation // see beforestd.h for explanation

View File

@@ -36,8 +36,6 @@
// 'id': identifier was truncated to 'num' characters in the debug info // 'id': identifier was truncated to 'num' characters in the debug info
#pragma warning(disable:4786) #pragma warning(disable:4786)
// MSVC 5 does not have this
#if __VISUALC__ > 1100
// we have to disable (and reenable in afterstd.h) this one because, // we have to disable (and reenable in afterstd.h) this one because,
// even though it is of level 4, it is not disabled by warning(push, 1) // even though it is of level 4, it is not disabled by warning(push, 1)
// below for VC7.1! // below for VC7.1!
@@ -46,21 +44,6 @@
#pragma warning(disable:4702) #pragma warning(disable:4702)
#pragma warning(push, 1) #pragma warning(push, 1)
#else // VC 5
// 'expression' : signed/unsigned mismatch
#pragma warning(disable:4018)
// 'identifier' : unreferenced formal parameter
#pragma warning(disable:4100)
// 'conversion' : conversion from 'type1' to 'type2',
// possible loss of data
#pragma warning(disable:4244)
// C++ language change: to explicitly specialize class template
// 'identifier' use the following syntax
#pragma warning(disable:4663)
#endif
#endif // VC++ < 7 #endif // VC++ < 7
/** /**

View File

@@ -51,8 +51,7 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString;
// not all compilers can deal with template Read/Write() methods, define this // not all compilers can deal with template Read/Write() methods, define this
// symbol if the template functions are available // symbol if the template functions are available
#if (!defined(__VISUALC__) || __VISUALC__ > 1200) && \ #if !defined( __VMS ) && \
!defined( __VMS ) && \
!(defined(__HP_aCC) && defined(__hppa)) !(defined(__HP_aCC) && defined(__hppa))
#define wxHAS_CONFIG_TEMPLATE_RW #define wxHAS_CONFIG_TEMPLATE_RW
#endif #endif

View File

@@ -1267,9 +1267,7 @@ inline wxUIntPtr wxPtrToUInt(const void *p)
doing here. Same thing with icc with -Wall. doing here. Same thing with icc with -Wall.
*/ */
#ifdef __VISUALC__ #ifdef __VISUALC__
#if __VISUALC__ >= 1200
#pragma warning(push) #pragma warning(push)
#endif
/* pointer truncation from '' to '' */ /* pointer truncation from '' to '' */
#pragma warning(disable: 4311) #pragma warning(disable: 4311)
#elif defined(__INTELC__) #elif defined(__INTELC__)
@@ -1280,7 +1278,7 @@ inline wxUIntPtr wxPtrToUInt(const void *p)
return wx_reinterpret_cast(wxUIntPtr, p); return wx_reinterpret_cast(wxUIntPtr, p);
#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__) #if defined(__VISUALC__) || defined(__INTELC__)
#pragma warning(pop) #pragma warning(pop)
#endif #endif
} }
@@ -1288,9 +1286,7 @@ inline wxUIntPtr wxPtrToUInt(const void *p)
inline void *wxUIntToPtr(wxUIntPtr p) inline void *wxUIntToPtr(wxUIntPtr p)
{ {
#ifdef __VISUALC__ #ifdef __VISUALC__
#if __VISUALC__ >= 1200
#pragma warning(push) #pragma warning(push)
#endif
/* conversion to type of greater size */ /* conversion to type of greater size */
#pragma warning(disable: 4312) #pragma warning(disable: 4312)
#elif defined(__INTELC__) #elif defined(__INTELC__)
@@ -1301,7 +1297,7 @@ inline void *wxUIntToPtr(wxUIntPtr p)
return wx_reinterpret_cast(void *, p); return wx_reinterpret_cast(void *, p);
#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__) #if defined(__VISUALC__) || defined(__INTELC__)
#pragma warning(pop) #pragma warning(pop)
#endif #endif
} }

View File

@@ -42,18 +42,13 @@ WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false);
#if defined(__SUNCC__) #if defined(__SUNCC__)
#define wxUSE_ARRAY_MEMORY_OPERATORS 0 #define wxUSE_ARRAY_MEMORY_OPERATORS 0
#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) )
#define wxUSE_ARRAY_MEMORY_OPERATORS 1
#elif defined (__SGI_CC_) #elif defined (__SGI_CC_)
// only supported by -n32 compilers // only supported by -n32 compilers
#ifndef __EDG_ABI_COMPATIBILITY_VERSION #ifndef __EDG_ABI_COMPATIBILITY_VERSION
#define wxUSE_ARRAY_MEMORY_OPERATORS 0 #define wxUSE_ARRAY_MEMORY_OPERATORS 0
#endif #endif
#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) )
#define wxUSE_ARRAY_MEMORY_OPERATORS 1
#else #else
// ::operator new[] is a recent C++ feature, so assume it's not supported #define wxUSE_ARRAY_MEMORY_OPERATORS 1
#define wxUSE_ARRAY_MEMORY_OPERATORS 0
#endif #endif
// devik 2000-8-29: All new/delete ops are now inline because they can't // devik 2000-8-29: All new/delete ops are now inline because they can't

View File

@@ -18,8 +18,7 @@
* support a way to do that. * support a way to do that.
*/ */
/* VC++ 5 didn't include oleacc.lib, though it came with the PSDK */ #if defined __VISUALC__ && wxUSE_ACCESSIBILITY
#if defined __VISUALC__ && (wxUSE_ACCESSIBILITY || __VISUALC__ >= 1200)
#pragma comment(lib, "oleacc") #pragma comment(lib, "oleacc")
#endif #endif

View File

@@ -141,74 +141,6 @@
#define QS_ALLPOSTMESSAGE 0 #define QS_ALLPOSTMESSAGE 0
#endif #endif
/*
* The following are required for VC++ 5 when the PSDK is not available.
*/
#if defined __VISUALC__ && __VISUALC__ <= 1100
#ifndef VER_NT_WORKSTATION
typedef struct _OSVERSIONINFOEXA {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[128];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
typedef struct _OSVERSIONINFOEXW {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[128];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW;
#ifdef UNICODE
typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
typedef OSVERSIONINFOEXW OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
#else
typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
#endif
#endif // defined VER_NT_WORKSTATION
#ifndef CP_SYMBOL
#define CP_SYMBOL 42
#endif
// NMLVCUSTOMDRAW originally didn't have the iSubItem member. It was added
// with IE4, as was IPN_FIRST which is used as a test :-(.
//
#ifndef IPN_FIRST
typedef struct wxtagNMLVCUSTOMDRAW_ {
NMCUSTOMDRAW nmcd;
COLORREF clrText;
COLORREF clrTextBk;
int iSubItem;
} wxNMLVCUSTOMDRAW_, *wxLPNMLVCUSTOMDRAW_;
#define NMLVCUSTOMDRAW wxNMLVCUSTOMDRAW_
#define LPNMLVCUSTOMDRAW wxLPNMLVCUSTOMDRAW_
#endif // defined IPN_FIRST
#endif // defined __VISUALC__ && __VISUALC__ <= 1100
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// menu stuff // menu stuff
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -22,7 +22,7 @@
// use debug CRT functions for memory leak detections in VC++ 5.0+ in debug // use debug CRT functions for memory leak detections in VC++ 5.0+ in debug
// builds // builds
#undef wxUSE_VC_CRTDBG #undef wxUSE_VC_CRTDBG
#if defined(_DEBUG) && defined(__VISUALC__) && (__VISUALC__ >= 1000) \ #if defined(_DEBUG) && defined(__VISUALC__) \
&& !defined(UNDER_CE) && !defined(UNDER_CE)
// it doesn't combine well with wxWin own memory debugging methods // it doesn't combine well with wxWin own memory debugging methods
#if !wxUSE_GLOBAL_MEMORY_OPERATORS && !wxUSE_MEMORY_TRACING && !defined(__NO_VC_CRTDBG__) #if !wxUSE_GLOBAL_MEMORY_OPERATORS && !wxUSE_MEMORY_TRACING && !defined(__NO_VC_CRTDBG__)

View File

@@ -191,7 +191,7 @@ private:
// VZ: I don't know it's not done for compilers other than VC++ but I leave it // VZ: I don't know it's not done for compilers other than VC++ but I leave it
// as is. Please note, though, that tracing OLE interface calls may be // as is. Please note, though, that tracing OLE interface calls may be
// incredibly useful when debugging OLE programs. // incredibly useful when debugging OLE programs.
#if defined(__WXDEBUG__) && (( defined(__VISUALC__) && (__VISUALC__ >= 1000) )) #if defined(__WXDEBUG__) && defined(__VISUALC__)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// All OLE specific log functions have DebugTrace level (as LogTrace) // All OLE specific log functions have DebugTrace level (as LogTrace)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -18,7 +18,7 @@
extern unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs); extern unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs);
// helper macro for wxSEH_HANDLE // helper macro for wxSEH_HANDLE
#if defined(__BORLANDC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1200)) #if defined(__BORLANDC__)
// some compilers don't understand that this code is unreachable and warn // some compilers don't understand that this code is unreachable and warn
// about no value being returned from the function without it, so calm them // about no value being returned from the function without it, so calm them
// down // down

View File

@@ -33,9 +33,6 @@ class WXDLLIMPEXP_CORE wxWindowMSW : public wxWindowBase
friend class wxSpinCtrl; friend class wxSpinCtrl;
friend class wxSlider; friend class wxSlider;
friend class wxRadioBox; friend class wxRadioBox;
#if defined __VISUALC__ && __VISUALC__ <= 1200
friend class wxWindowMSW;
#endif
public: public:
wxWindowMSW() { Init(); } wxWindowMSW() { Init(); }

View File

@@ -115,7 +115,7 @@ struct WXDLLIMPEXP_BASE wxStringData
void Lock() { if ( !IsEmpty() ) nRefs++; } void Lock() { if ( !IsEmpty() ) nRefs++; }
// VC++ will refuse to inline Unlock but profiling shows that it is wrong // VC++ will refuse to inline Unlock but profiling shows that it is wrong
#if defined(__VISUALC__) && (__VISUALC__ >= 1200) #if defined(__VISUALC__)
__forceinline __forceinline
#endif #endif
// VC++ free must take place in same DLL as allocation when using non dll // VC++ free must take place in same DLL as allocation when using non dll
@@ -327,7 +327,7 @@ public:
{ return wxStdString(c_str(), length()); } { return wxStdString(c_str(), length()); }
#endif #endif
#if defined(__VISUALC__) && (__VISUALC__ >= 1200) #if defined(__VISUALC__)
// disable warning about Unlock() below not being inlined (first, it // disable warning about Unlock() below not being inlined (first, it
// seems to be inlined nevertheless and second, even if it isn't, there // seems to be inlined nevertheless and second, even if it isn't, there
// is nothing we can do about this // is nothing we can do about this
@@ -341,7 +341,7 @@ public:
GetStringData()->Unlock(); GetStringData()->Unlock();
} }
#if defined(__VISUALC__) && (__VISUALC__ >= 1200) #if defined(__VISUALC__)
#pragma warning(pop) #pragma warning(pop)
#endif #endif

View File

@@ -45,13 +45,12 @@
wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent ); wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent );
wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent ); wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent );
// Doesn't yet compile under VC++ 4, BC++ // Doesn't yet compile under BC++
// Wine: no wininet.h // Wine: no wininet.h
#if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \ #if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \
(!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \ (!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \
!defined(__GNUWIN32_OLD__) && \ !defined(__GNUWIN32_OLD__) && \
!defined(__WINE__) && \ !defined(__WINE__)
(!defined(__VISUALC__) || (__VISUALC__ >= 1020))
#include <ras.h> #include <ras.h>
#include <raserror.h> #include <raserror.h>

View File

@@ -49,7 +49,7 @@
#include "wx/msw/ole/oleutils.h" #include "wx/msw/ole/oleutils.h"
#include "wx/msw/ole/safearray.h" #include "wx/msw/ole/safearray.h"
#if defined(__VISUALC__) && (__VISUALC__ > 1000) #if defined(__VISUALC__)
#include <docobj.h> #include <docobj.h>
#endif #endif
@@ -561,7 +561,7 @@ wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant, long fla
#if wxUSE_DATAOBJ #if wxUSE_DATAOBJ
#if wxDEBUG_LEVEL && (( defined(__VISUALC__) && (__VISUALC__ > 1000) )) #if wxDEBUG_LEVEL && defined(__VISUALC__)
static wxString GetIidName(REFIID riid) static wxString GetIidName(REFIID riid)
{ {
// an association between symbolic name and numeric value of an IID // an association between symbolic name and numeric value of an IID

View File

@@ -25,8 +25,7 @@
#include "wx/hashmap.h" #include "wx/hashmap.h"
#include "wx/hashset.h" #include "wx/hashset.h"
#if defined wxLongLong_t && !defined wxLongLongIsLong && \ #if defined wxLongLong_t && !defined wxLongLongIsLong
(!defined __VISUALC__ || __VISUALC__ > 1100) // doesn't work on VC5
#define TEST_LONGLONG #define TEST_LONGLONG
#endif #endif
@@ -468,12 +467,6 @@ void HashesTestCase::LLongHashMapTest() { HashMapTest<myLLongHashMap>(); }
void HashesTestCase::ULLongHashMapTest() { HashMapTest<myULLongHashMap>(); } void HashesTestCase::ULLongHashMapTest() { HashMapTest<myULLongHashMap>(); }
#endif #endif
#ifdef __VISUALC__
#if __VISUALC__ <= 1200
#pragma warning(disable:4284) // operator->() returns a non-UDT
#endif
#endif // __VISUALC__
// test compilation of basic set types // test compilation of basic set types
WX_DECLARE_HASH_SET( int*, wxPointerHash, wxPointerEqual, myPtrHashSet ); WX_DECLARE_HASH_SET( int*, wxPointerHash, wxPointerEqual, myPtrHashSet );
WX_DECLARE_HASH_SET( long, wxIntegerHash, wxIntegerEqual, myLongHashSet ); WX_DECLARE_HASH_SET( long, wxIntegerHash, wxIntegerEqual, myLongHashSet );