mirror of https://github.com/OpenTTD/OpenTTD.git
Cleanup: remove checks for old MSVC versions
This commit is contained in:
parent
d09b5aaeba
commit
caa7c44052
|
@ -259,7 +259,7 @@ void CreateConsole()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1900
|
#if defined(_MSC_VER)
|
||||||
freopen("CONOUT$", "a", stdout);
|
freopen("CONOUT$", "a", stdout);
|
||||||
freopen("CONIN$", "r", stdin);
|
freopen("CONIN$", "r", stdin);
|
||||||
freopen("CONOUT$", "a", stderr);
|
freopen("CONOUT$", "a", stderr);
|
||||||
|
|
27
src/stdafx.h
27
src/stdafx.h
|
@ -28,6 +28,12 @@
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
# include "os/macosx/osx_stdafx.h"
|
# include "os/macosx/osx_stdafx.h"
|
||||||
|
#else
|
||||||
|
/* It seems that we need to include stdint.h before anything else
|
||||||
|
* We need INT64_MAX, which for most systems comes from stdint.h.
|
||||||
|
* For OSX the inclusion is already done in osx_stdafx.h. */
|
||||||
|
# define __STDC_LIMIT_MACROS
|
||||||
|
# include <stdint.h>
|
||||||
#endif /* __APPLE__ */
|
#endif /* __APPLE__ */
|
||||||
|
|
||||||
#if defined(__HAIKU__)
|
#if defined(__HAIKU__)
|
||||||
|
@ -37,15 +43,6 @@
|
||||||
# define _GNU_SOURCE
|
# define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* It seems that we need to include stdint.h before anything else
|
|
||||||
* We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC
|
|
||||||
* does not have stdint.h.
|
|
||||||
* For OSX the inclusion is already done in osx_stdafx.h. */
|
|
||||||
#if !defined(__APPLE__) && (!defined(_MSC_VER) || _MSC_VER >= 1600)
|
|
||||||
# define __STDC_LIMIT_MACROS
|
|
||||||
# include <stdint.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <bit>
|
#include <bit>
|
||||||
|
@ -115,9 +112,6 @@
|
||||||
# pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
|
# pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
|
||||||
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
||||||
|
|
||||||
# if (_MSC_VER < 1400) // MSVC 2005 safety checks
|
|
||||||
# error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not! Upgrade your compiler."
|
|
||||||
# endif /* (_MSC_VER < 1400) */
|
|
||||||
# pragma warning(disable: 4291) // no matching operator delete found; memory will not be freed if initialization throws an exception (reason: our overloaded functions never throw an exception)
|
# pragma warning(disable: 4291) // no matching operator delete found; memory will not be freed if initialization throws an exception (reason: our overloaded functions never throw an exception)
|
||||||
# pragma warning(disable: 4996) // 'function': was declared deprecated
|
# pragma warning(disable: 4996) // 'function': was declared deprecated
|
||||||
# pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
|
# pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
|
||||||
|
@ -126,15 +120,6 @@
|
||||||
# pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
|
# pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
|
||||||
# pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
|
# pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
|
||||||
|
|
||||||
# if (_MSC_VER == 1500) // Addresses item #13 on http://blogs.msdn.com/b/vcblog/archive/2008/08/11/tr1-fixes-in-vc9-sp1.aspx, for Visual Studio 2008
|
|
||||||
# define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY
|
|
||||||
# include <intrin.h>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if (_MSC_VER < 1900)
|
|
||||||
# define inline __forceinline
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# define CDECL _cdecl
|
# define CDECL _cdecl
|
||||||
|
|
||||||
# if defined(_WIN32) && !defined(_WIN64)
|
# if defined(_WIN32) && !defined(_WIN64)
|
||||||
|
|
Loading…
Reference in New Issue