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! :)
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Warn about overriding functions without 'override' keyword?
Hi,
Is it possible to enable a warning for these kind of things?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement