From 91875045ac841f2c1d9d7d6b1c7539ba7d111b06 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Dec 2017 00:06:08 +0100 Subject: [PATCH] Don't make wxStaticBoxBase::GetBordersForSizer() inline Move the function definition to the source file, there doesn't seem to be any reason to keep it in the header. --- include/wx/statbox.h | 8 +------- src/common/statboxcmn.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/wx/statbox.h b/include/wx/statbox.h index 360881031a..0e6e4f3ac3 100644 --- a/include/wx/statbox.h +++ b/include/wx/statbox.h @@ -37,13 +37,7 @@ public: // // the top border is the margin at the top (where the title is), // borderOther is the margin on all other sides - virtual void GetBordersForSizer(int *borderTop, int *borderOther) const - { - const int BORDER = FromDIP(5); // FIXME: hardcoded value - - *borderTop = GetLabel().empty() ? BORDER : GetCharHeight(); - *borderOther = BORDER; - } + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; // This is an internal function currently used by wxStaticBoxSizer only. // diff --git a/src/common/statboxcmn.cpp b/src/common/statboxcmn.cpp index 62c4b50134..c8427783f3 100644 --- a/src/common/statboxcmn.cpp +++ b/src/common/statboxcmn.cpp @@ -38,6 +38,14 @@ wxStaticBoxBase::wxStaticBoxBase() #endif } +void wxStaticBoxBase::GetBordersForSizer(int *borderTop, int *borderOther) const +{ + const int BORDER = FromDIP(5); // FIXME: hardcoded value + + *borderTop = GetLabel().empty() ? BORDER : GetCharHeight(); + *borderOther = BORDER; +} + void wxStaticBoxBase::WXDestroyWithoutChildren() { // Notice that we must make a copy of the list as it will be changed by