Changeset - r10957:634af0c37ffa
[Not reviewed]
master
0 5 0
smatz - 16 years ago 2009-01-30 17:54:48
smatz@openttd.org
(svn r15296) -Cleanup: remove redundant _MSC_VER >= 1400 checks, older versions aren't supported anymore. One check in stdafx.h is enough
5 files changed with 10 insertions and 26 deletions:
0 comments (0 inline, 0 general)
src/map.cpp
Show inline comments
 
@@ -10,7 +10,7 @@
 
#include "core/math_func.hpp"
 
#include "map_func.h"
 

	
 
#if defined(_MSC_VER) && _MSC_VER >= 1400 /* VStudio 2005 is stupid! */
 
#if defined(_MSC_VER)
 
/* Why the hell is that not in all MSVC headers?? */
 
extern "C" _CRTIMP void __cdecl _assert(void *, void *, unsigned);
 
#endif
src/misc/binaryheap.hpp
Show inline comments
 
@@ -5,12 +5,6 @@
 
#ifndef  BINARYHEAP_HPP
 
#define  BINARYHEAP_HPP
 

	
 
//void *operator new (size_t size, void *p) {return p;}
 
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
 
//void operator delete (void *p, void *p2) {}
 
#endif
 

	
 

	
 
/**
 
 * Binary Heap as C++ template.
 
 *
src/misc/strapi.hpp
Show inline comments
 
@@ -38,11 +38,11 @@ template <> /*static*/ inline size_t CSt
 
/** ::vsprintf wrapper specialization for char */
 
template <> /*static*/ inline int CStrApiBaseT<char>::SPrintFL(char *buf, size_t count, const char *fmt, va_list args)
 
{
 
#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(WINCE) // VC 8.0 and above
 
#if defined(_MSC_VER) && !defined(WINCE)
 
	return ::vsnprintf_s(buf, count, count - 1, fmt, args);
 
#else /* ! VC 8.0 and above */
 
#else
 
	return ::vsnprintf(buf, count, fmt, args);
 
#endif
 
#endif /* _MSC_VER && ! WINCE */
 
}
 

	
 
#if defined(HAS_WCHAR)
 
@@ -55,15 +55,15 @@ template <> /*static*/ inline size_t CSt
 
/** ::vsprintf wrapper specialization for wchar_t */
 
template <> /*static*/ inline int CStrApiBaseT<wchar_t>::SPrintFL(wchar_t *buf, size_t count, const wchar_t *fmt, va_list args)
 
{
 
#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(WINCE) // VC 8.0 and above
 
#if defined(_MSC_VER) && !defined(WINCE)
 
	return ::_vsnwprintf_s(buf, count, count - 1, fmt, args);
 
#else /* ! VC 8.0 and above */
 
#else
 
# if defined(_WIN32)
 
	 return ::_vsnwprintf(buf, count, fmt, args);
 
# else /* !_WIN32 */
 
	 return ::vswprintf(buf, count, fmt, args);
 
# endif /* !_WIN32 */
 
#endif
 
#endif /* _MSC_VER && ! WINCE */
 
}
 
#endif /* HAS_WCHAR */
 

	
src/os_timer.cpp
Show inline comments
 
@@ -9,22 +9,12 @@
 
/* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
 
 * from external win64.asm because VS2005 does not support inline assembly */
 
#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE) && !defined(WINCE)
 
# if _MSC_VER >= 1400
 
#include <intrin.h>
 
uint64 ottd_rdtsc()
 
{
 
	return __rdtsc();
 
}
 
#	else
 
uint64 _declspec(naked) ottd_rdtsc()
 
{
 
	_asm {
 
		rdtsc
 
		ret
 
	}
 
}
 
# endif
 
# define RDTSC_AVAILABLE
 
#define RDTSC_AVAILABLE
 
#endif
 

	
 
/* rdtsc for OS/2. Hopefully this works, who knows */
src/stdafx.h
Show inline comments
 
@@ -167,7 +167,7 @@
 
	#pragma warning(disable: 4200)  // nonstandard extension used : zero-sized array in struct/union
 

	
 
	#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."
 
		#error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not! Upgrade your compiler."
 
	#endif /* (_MSC_VER < 1400) */
 
	#pragma warning(disable: 4996)   // 'strdup' was declared deprecated
 
	#define _CRT_SECURE_NO_DEPRECATE // all deprecated 'unsafe string functions
 
@@ -188,7 +188,7 @@
 
	#endif
 

	
 
	int CDECL snprintf(char *str, size_t size, const char *format, ...);
 
	#if (_MSC_VER < 1400) || defined(WINCE)
 
	#if defined(WINCE)
 
		int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
 
	#endif
 

	
0 comments (0 inline, 0 general)