From 451e482d99fa23807e33744baa2af98833635a98 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 2 Jun 2022 23:41:34 +0200 Subject: [PATCH] Remove useless CreateFromStdIcon() from wxMSW art provider This function has become completely trivial after the previous commit, so just remove it and create the bitmap from the icon directly in CreateBitmap(). --- src/msw/artmsw.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/msw/artmsw.cpp b/src/msw/artmsw.cpp index dc597c9839..6f18c09fdd 100644 --- a/src/msw/artmsw.cpp +++ b/src/msw/artmsw.cpp @@ -203,16 +203,6 @@ protected: const wxSize& size) wxOVERRIDE; }; -static wxBitmap CreateFromStdIcon(const char *iconName, - const wxArtClient& client) -{ - wxIcon icon(iconName); - wxBitmap bmp; - bmp.CopyFromIcon(icon); - - return bmp; -} - wxBitmap wxWindowsArtProvider::CreateBitmap(const wxArtID& id, const wxArtClient& client, const wxSize& size) @@ -284,7 +274,7 @@ wxBitmap wxWindowsArtProvider::CreateBitmap(const wxArtID& id, name = "wxICON_QUESTION"; if ( name ) - return CreateFromStdIcon(name, client); + return wxIcon(name); } // for anything else, fall back to generic provider: