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).
This commit is contained in:
Vadim Zeitlin
2022-03-24 00:05:01 +01:00
parent ca4131faac
commit 4e4b80760b
2 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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))