From 814852e9664e108f86e9e1160b2cefcc31be83a6 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 30 Mar 2020 11:11:59 +0100 Subject: [PATCH] macOS: Fixed another spurious dynamic_cast type_info warning when loading dylibs containing JUCE at runtime --- .../juce_gui_basics/layout/juce_TabbedComponent.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp b/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp index 437c497dfa..7b13a45b9c 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp @@ -56,10 +56,7 @@ namespace TabbedComponentHelpers //============================================================================== struct TabbedComponent::ButtonBar : public TabbedButtonBar { - ButtonBar (TabbedComponent& tabComp, TabbedButtonBar::Orientation o) - : TabbedButtonBar (o), owner (tabComp) - { - } + ButtonBar (TabbedComponent& tabComp, TabbedButtonBar::Orientation o); void currentTabChanged (int newCurrentTabIndex, const String& newTabName) { @@ -86,6 +83,12 @@ struct TabbedComponent::ButtonBar : public TabbedButtonBar JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonBar) }; +// The following implementation is outside of the class definition to avoid spurious +// warning messages when dynamically loading libraries at runtime on macOS +TabbedComponent::ButtonBar::ButtonBar (TabbedComponent& tabComp, TabbedButtonBar::Orientation o) + : TabbedButtonBar (o), owner (tabComp) +{ +} //============================================================================== TabbedComponent::TabbedComponent (TabbedButtonBar::Orientation orientation)