Merge r4539 from trunk:

Add override patch by hendu, to check for proper deriving in the class tree. Added MSVC support for this feature, should work beginning with MSVC 2010


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4631 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2014-01-07 21:32:13 +00:00
parent 79daf2a837
commit a362e6ed4c
1 changed files with 14 additions and 0 deletions

View File

@ -195,6 +195,20 @@ For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {}
#define _IRR_DEPRECATED_
#endif
//! Defines an override macro, to protect virtual functions from typos and other mismatches
/** Usage in a derived class:
virtual void somefunc() _IRR_OVERRIDE_;
*/
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 7)
#define _IRR_OVERRIDE_ override
#elif (_MSC_VER >= 1600 ) /* supported since MSVC 2010 */
#define _IRR_OVERRIDE_ override
#elif (__clang_major__ >= 3)
#define _IRR_OVERRIDE_ override
#else
#define _IRR_OVERRIDE_
#endif
//! Defines a small statement to work around a microsoft compiler bug.
/** The microsoft compiler 7.0 - 7.1 has a bug:
When you call unmanaged code that returns a bool type value of false from managed code,