Replace many identical wxBitmap::CopyFromIcon() with a single one

Define CopyFromIcon() directly in wxBitmapBase for the non-MSW ports, as
it was implemented exactly in the same way in all ports using this class
anyhow.

This means this function is not virtual any longer, but this shouldn't
be a problem as it was never supposed to be overridden in application
code and this couldn't be done with wxMSW, where it never was virtual in
the first place, anyhow.

No real changes, just a simplification.
This commit is contained in:
Vadim Zeitlin
2021-10-25 23:32:23 +02:00
parent 568411347b
commit 41b1ba3c9e
14 changed files with 7 additions and 56 deletions

View File

@@ -603,12 +603,6 @@ void wxBitmap::SetMask(wxMask *mask)
M_BITMAP->m_mask = mask;
}
bool wxBitmap::CopyFromIcon(const wxIcon& icon)
{
*this = *((wxBitmap*)(&icon));
return true;
}
wxBitmap wxBitmap::GetSubBitmap(const wxRect& rect) const
{
wxCHECK_MSG( IsOk() &&