Commit f8d7aab7 authored by hybrid's avatar hybrid

Add override patch by hende, to check for proper deriving in the class tree....

Add override patch by hende, 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/trunk@4539 dfc29bdd-3216-0410-991c-e03cc46cb475
parent dadf0b99
...@@ -195,6 +195,20 @@ For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {} ...@@ -195,6 +195,20 @@ For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {}
#define _IRR_DEPRECATED_ #define _IRR_DEPRECATED_
#endif #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. //! Defines a small statement to work around a microsoft compiler bug.
/** The microsoft compiler 7.0 - 7.1 has a 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, When you call unmanaged code that returns a bool type value of false from managed code,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment