Warn about overriding functions without 'override' keyword?

Started by
0 comments, last by WitchLord 8 years, 2 months ago
Hi, Is it possible to enable a warning for these kind of things?
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! :)
Advertisement

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