summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-11 21:15:58 +0000
committerrubidium <rubidium@openttd.org>2009-11-11 21:15:58 +0000
commit485b5a9c2fc1840255a0fe2fe7a1dd3f4d0e0130 (patch)
tree7ad968ec694d6acaf54711b090f88c9973590be3 /src/stdafx.h
parent285d25e01bff95ce845f4b92efa9ce0253b66429 (diff)
downloadopenttd-485b5a9c2fc1840255a0fe2fe7a1dd3f4d0e0130.tar.xz
(svn r18045) -Fix: GCC 4.5@HEAD not compiling OpenTTD anymore because of a "non-placement deallocation function [is] selected for placement delete", or in other words delete(void *, size_t) is 'magic'.
We implemented these delete(void *, size_t) operator functions because MSVC warned that "no matching operator delete found; memory will not be freed if initialization throws an exception" for new(size_t, size_t). This disables MSVC warning about this because we do not use exceptions in the (constructors that use the) overridden allocation functions, as such they will never be called; delete(void *) remains necessary though.
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index bac0a6c46..59601c6d6 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -162,6 +162,7 @@
#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: 4996) // 'strdup' was declared deprecated
#define _CRT_SECURE_NO_DEPRECATE // all deprecated 'unsafe string functions
#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