Comment 12 for bug 1412528

Revision history for this message
jean-pierre charras (jp-charras) wrote : Re: [Bug 1412528] Re: Several -Woverloaded-virtual warnings

Le 21/01/2015 19:56, Wayne Stambaugh a écrit :
> I was looking at patch
> 0001-EDA_BASE_FRAME-fix-a-Woverloaded-virtual-warning.patch and was
> wondering if anyone knows why we are providing our own
> EDA_BASE_FRAME::IsActive() instead of using wxFrame::IsActive()? Is
> wxFrame::IsActive() broken in some way that we cannot use it to
> determine if the wxFrame is active? It appears to me that
> EDA_BASE_FRAME::IsActive() and it's related member variable
> m_FrameIsActive are unnecessary since I cannot file them used anywhere
> in KiCad other than inside an wxActivateEvent() handler which makes them
> redundant. Just use wxActiveateEvent::GetActive() instead of keeping a
> copy of the active state laying around. Can anyone shed some light on
> why this is written this way? I would rather get rid of the unnecessary
> code rather than apply this patch.

I perhaps wrote this code.
I do not remember why.

Perhaps it was useful with very old wxWidgets version (I started with 1.66).
Seems now a duplicate of GetActive().

Please feel free to cleanup the code.

Thanks.

>
> On 1/21/2015 1:08 PM, Fat-Zer wrote:
>>> Looks outdated.
>> Nope, you can build the current kicad source with -Woverloaded-virtual either with gcc or clang and see a bunch of those warnings...
>>
>

--
Jean-Pierre CHARRAS