← Back to team overview

kicad-developers team mailing list archive

Re: Plethora of warnings from -Woverloaded-virtual

 

On Tue, Feb 18, 2014 at 07:36:59PM -0600, Dick Hollenbeck wrote:
> There is currently not enough protection against somebody changing the base, then you end
> up with TWO virtuals.  This is why the derived ones are not using it.

I'm not getting the meaning of this... what do you mean with 'protection
against somebody changing the base'? If someone changes the base then
he's responsible for changing *all* the subclasses, too, otherwise
Liskov doesn't hold anymore!

> I don't find that compiler option useful, at all.

It usually can be useful since (usually) overloads follow the original
function path of inheritance, i.e. if foo(int) is virtual, often
foo(double) is too; however this is not mandatory and the warning just
indicates this.

However if someone (you) decided that virtual is not necessary, fine.
I'd personally had used another name to avoid confusion, but it's
personal preference, obviously...

-- 
Lorenzo Marcantonio
Logos Srl


References