From 4e4b80760beca90d869df51ec2d8ca00a78501b4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 24 Mar 2022 00:05:01 +0100 Subject: [PATCH] Move wxArtProvider::DoGetSizeHint() out of line and simplify it This function has no need to be inline and it can be written in a more clear way by just calling GetNativeSizeHint() directly instead of passing by GetSizeHint(true). --- include/wx/artprov.h | 5 +---- src/common/artprov.cpp | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/wx/artprov.h b/include/wx/artprov.h index 6828a6b4d5..a2f7fb57a0 100644 --- a/include/wx/artprov.h +++ b/include/wx/artprov.h @@ -224,10 +224,7 @@ protected: static void CleanUpProviders(); // Get the default size of an icon for a specific client - virtual wxSize DoGetSizeHint(const wxArtClient& client) - { - return GetSizeHint(client, true); - } + virtual wxSize DoGetSizeHint(const wxArtClient& client); // Derived classes must override at least one of the CreateXXX() functions // below to create requested art resource. Overriding more than one of them diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index ce25e5633f..c7b48de4c7 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -543,6 +543,11 @@ wxArtID wxArtProvider::GetMessageBoxIconId(int flags) return GetNativeSizeHint(client); } +wxSize wxArtProvider::DoGetSizeHint(const wxArtClient& client) +{ + return GetNativeSizeHint(client); +} + #ifndef wxHAS_NATIVE_ART_PROVIDER_IMPL /*static*/ wxSize wxArtProvider::GetNativeSizeHint(const wxArtClient& WXUNUSED(client))