[Scummvm-cvs-logs] scummvm master -> 84c2267734cea15ea8b2ecae3ca307d835dcfd60

bluegr bluegr at gmail.com
Tue Oct 28 13:18:41 CET 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
daceff7b2d COMMON: Use true nullptr in Visual Studio 2010+ and true override in VS 2012+
84c2267734 Merge pull request #502 from SpecLad/visual-c++11


Commit: daceff7b2d08aa57060592b6eb7a60fe960b048c
    https://github.com/scummvm/scummvm/commit/daceff7b2d08aa57060592b6eb7a60fe960b048c
Author: Роман Донченко (dpb at corrigendum.ru)
Date: 2014-09-05T23:25:19+04:00

Commit Message:
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.

Changed paths:
    common/c++11-compat.h



diff --git a/common/c++11-compat.h b/common/c++11-compat.h
index 14e0642..9fd252c 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


Commit: 84c2267734cea15ea8b2ecae3ca307d835dcfd60
    https://github.com/scummvm/scummvm/commit/84c2267734cea15ea8b2ecae3ca307d835dcfd60
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-28T14:17:47+02:00

Commit Message:
Merge pull request #502 from SpecLad/visual-c++11

COMMON: Use true nullptr in Visual Studio 2010+ and true override in VS 2012+

Changed paths:
    common/c++11-compat.h









More information about the Scummvm-git-logs mailing list