Remove almost empty src/generic/icon.cpp

Don't bother creating a separate object file for just a few lines of
code in the generic wxIcon implementation, just inline them into
wx/generic/icon.h.

There should be no need to ever have any non-trivial code here as
generic wxIcon is the same thing as wxBitmap anyhow.
This commit is contained in:
Vadim Zeitlin
2024-10-21 22:02:39 +02:00
parent 1355cad8dc
commit 7b6d56f050
9 changed files with 24 additions and 221 deletions
+7 -3
View File
@@ -19,9 +19,9 @@
class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
{
public:
wxIcon();
wxIcon() = default;
wxIcon(const char* const* bits);
wxIcon(const char* const* bits) : wxBitmap(bits) { }
// For compatibility with wxMSW where desired size is sometimes required to
// distinguish between multiple icons in a resource.
@@ -49,7 +49,11 @@ public:
// create from bitmap (which should have a mask unless it's monochrome):
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
// ctors, assignment operators...), but it's ok to have such function
void CopyFromBitmap(const wxBitmap& bmp);
void CopyFromBitmap(const wxBitmap& bmp)
{
if ( &bmp != this )
Ref(bmp);
}
wxDECLARE_VARIANT_OBJECT_EXPORTED(wxIcon, WXDLLIMPEXP_CORE);