Page MenuHome

Compositor: Enable suggest-override warning.
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Mar 29 2021, 8:54 AM.

Details

Summary

Compostior relies heavilly on overridden methods. The override keyword has been added
in this module and is desired. The benefit of the override keyword is
that it reports an error when not applied to a (base) virtual method and report
what will not match when refactoring the code to be closer to blender style guide.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested review of this revision.Mar 29 2021, 8:54 AM
Jeroen Bakker (jbakker) created this revision.

I'm not sure why i'm reviewing this, i guess you want to run this by me to see if MSVC has a warn like this? (it doesn't sadly)

how much noise does this make if one were to enable this on a global level?

I came to the same insight.
When setting it globally it would generate thousands of messages. Hence I wanted to do this in this module. As I'm not familiar with what is allowed within our build system I wanted this to pass by someone who does. Perhaps I need to poke campbell to review this.

Just checking, even though i don't have the warn on windows, i like it, if enabling it globally were to push out 20-30 extra warns, it be worth fixing those and doing it globally, 1000's is a different story though

Ankit Meel (ankitm) added inline comments.
source/blender/compositor/CMakeLists.txt
576

Suggest target_compile_options as it's the intended function, and also to clarify that it's a warning for bf_compositor, instead of all targets under this directory (add_compile_options in that case). example: rBfced6f19be49de9024de2c0fa657f1849dfb54a8

  • Use target_compile_options.
Jeroen Bakker (jbakker) marked an inline comment as done.Apr 7 2021, 11:46 AM

LGTM. I think this could even be a nice thing to enable globally in a Code Quality Day. I'm a big fan of the override keyword.

This revision is now accepted and ready to land.Apr 8 2021, 1:06 PM