From: Julian Smart Date: Thu, 19 Feb 2004 15:26:03 +0000 (+0000) Subject: GetSubcontrols now const X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bf25c88b6ab494b22c732406237c6957e26d72d9?ds=inline GetSubcontrols now const git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h index c8e1e94644..2549f9b989 100644 --- a/include/wx/msw/control.h +++ b/include/wx/msw/control.h @@ -58,7 +58,7 @@ public: virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *WXUNUSED(item)) { return FALSE; }; virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *WXUNUSED(item)) { return FALSE; }; - wxArrayLong GetSubcontrols() { return m_subControls; } + const wxArrayLong& GetSubcontrols() const { return m_subControls; } void OnEraseBackground(wxEraseEvent& event); diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index cec5c0f8ed..0ab90686a8 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -350,7 +350,7 @@ void wxToolTip::SetWindow(wxWindow *win) wxControl *control = wxDynamicCast(m_window, wxControl); if ( control ) { - const wxArrayLong subcontrols = control->GetSubcontrols(); + const wxArrayLong& subcontrols = control->GetSubcontrols(); size_t count = subcontrols.GetCount(); for ( size_t n = 0; n < count; n++ ) {