diff options
author | Роман Донченко | 2014-09-05 23:17:57 +0400 |
---|---|---|
committer | Роман Донченко | 2014-09-05 23:25:19 +0400 |
commit | daceff7b2d08aa57060592b6eb7a60fe960b048c (patch) | |
tree | 74cbd4f8f099b594d6209bd3570419ce5426a46b | |
parent | 8eb82fd6c1c65ad0590462853ade281101068afa (diff) | |
download | scummvm-rg350-daceff7b2d08aa57060592b6eb7a60fe960b048c.tar.gz scummvm-rg350-daceff7b2d08aa57060592b6eb7a60fe960b048c.tar.bz2 scummvm-rg350-daceff7b2d08aa57060592b6eb7a60fe960b048c.zip |
COMMON: Use true nullptr in Visual Studio 2010+ and true override in VS 2012+
Those compilers support these features despite not being fully C++11-compliant.
<http://msdn.microsoft.com/en-us/library/hh567368.aspx> says that VS 2010
has "partial" support for override. I don't know what that entails and I
can't test it, so I err on the side of caution and only enable it in 2012
and up.
-rw-r--r-- | common/c++11-compat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/c++11-compat.h b/common/c++11-compat.h index 14e0642821..9fd252cc67 100644 --- a/common/c++11-compat.h +++ b/common/c++11-compat.h @@ -32,13 +32,17 @@ // though. // #if !defined(nullptr) // XCode 5.0.1 has __cplusplus=199711 but defines this +#if !defined(_MSC_VER) || _MSC_VER < 1600 #define nullptr 0 #endif +#endif // // Replacement for the override keyword. This allows compilation of code // which uses it, but does not feature any semantic. // +#if !defined(_MSC_VER) || _MSC_VER < 1700 #define override +#endif #endif |