Avoid harmless warnings about non-virtual wxMSWOwnerDrawnButtonBase dtor.

Make the dtor protected to ensure that it's impossible to delete objects via
it as this is not supposed to be ever done anyhow.

Closes #17005.
This commit is contained in:
Vadim Zeitlin
2015-05-31 23:24:40 +02:00
parent 9c9f80223b
commit af3a5c8cb4

View File

@@ -32,6 +32,13 @@ protected:
m_isHot = false;
}
// Explicitly define the destructor even if it's trivial to make it
// protected. This avoids compiler warnings about the fact that this class
// has virtual functions, but no virtual destructor without making the dtor
// virtual which is not needed here as objects are never deleted via
// pointers to this class (and protected dtor enforces this).
~wxMSWOwnerDrawnButtonBase() { }
// Make the control owner drawn if necessary to implement support for the
// given foreground colour.
void MSWMakeOwnerDrawnIfNecessary(const wxColour& colFg);