From 0122ce20c4b81d5a50504bb3a0ea3a617be62718 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 6 Jan 2024 23:04:34 +0100 Subject: [PATCH] Hide operator<<() overloaded for wxBitmapBundle Define it inside this class and not in the global scope. --- include/wx/bmpbndl.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/include/wx/bmpbndl.h b/include/wx/bmpbndl.h index 7b60fd9d18..217e2b2afb 100644 --- a/include/wx/bmpbndl.h +++ b/include/wx/bmpbndl.h @@ -17,6 +17,7 @@ class wxBitmapBundleImpl; class WXDLLIMPEXP_FWD_CORE wxIconBundle; class WXDLLIMPEXP_FWD_CORE wxImageList; +class WXDLLIMPEXP_FWD_BASE wxVariant; class WXDLLIMPEXP_FWD_CORE wxWindow; // ---------------------------------------------------------------------------- @@ -155,6 +156,15 @@ public: return GetImpl() == other.GetImpl(); } + // Allow using wxBitmapBundle with wxVariant +#if wxUSE_VARIANT + friend WXDLLIMPEXP_CORE + wxBitmapBundle& operator<<(wxBitmapBundle& value, const wxVariant& variant); + friend WXDLLIMPEXP_CORE + wxVariant& operator<<(wxVariant& variant, const wxBitmapBundle& value); +#endif // wxUSE_VARIANT + + // Implementation only from now on. // Get the bitmap size preferred by the majority of the elements of the @@ -274,19 +284,4 @@ public: virtual wxBitmap GetBitmap(const wxSize& size) = 0; }; -// ---------------------------------------------------------------------------- -// Allow using wxBitmapBundle in wxVariant -// ---------------------------------------------------------------------------- - -#if wxUSE_VARIANT - -class WXDLLIMPEXP_FWD_BASE wxVariant; - -WXDLLIMPEXP_CORE -wxBitmapBundle& operator<<(wxBitmapBundle& value, const wxVariant& variant); -WXDLLIMPEXP_CORE -wxVariant& operator<<(wxVariant& variant, const wxBitmapBundle& value); - -#endif // wxUSE_VARIANT - #endif // _WX_BMPBNDL_H_