class Foo
{
void Test()
{
}
}
class Bar : Foo
{
void Test() // Warning: No 'override' keyword!
{
Foo::Test();
}
}
This would make for a helpful error if I ever decide to add a parameter to Test(), or change its return value or name, etc. and I happen to forget about the other classes.
Thanks for being active on this forum by the way! :)
Warn about overriding functions without 'override' keyword?
Hi,
Is it possible to enable a warning for these kind of things?
Thanks for the suggestion. I'll look into it.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement