Take const pointer in wxAuiTabContainer::GetIdxFromWindow()

Allow passing const pointers to this function, as it doesn't need to
modify them at all.
This commit is contained in:
Vadim Zeitlin 2022-04-16 22:52:30 +01:00
parent 59463eced4
commit 8afbf79d02
3 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ public:
bool TabHitTest(int x, int y, wxWindow** hit) const;
bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const;
wxWindow* GetWindowFromIdx(size_t idx) const;
int GetIdxFromWindow(wxWindow* page) const;
int GetIdxFromWindow(const wxWindow* page) const;
size_t GetPageCount() const;
wxAuiNotebookPage& GetPage(size_t idx);
const wxAuiNotebookPage& GetPage(size_t idx) const;

View File

@ -523,7 +523,7 @@ public:
bool TabHitTest(int x, int y, wxWindow** hit) const;
bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const;
wxWindow* GetWindowFromIdx(size_t idx) const;
int GetIdxFromWindow(wxWindow* page) const;
int GetIdxFromWindow(const wxWindow* page) const;
size_t GetPageCount() const;
wxAuiNotebookPage& GetPage(size_t idx);
const wxAuiNotebookPage& GetPage(size_t idx) const;

View File

@ -325,7 +325,7 @@ wxWindow* wxAuiTabContainer::GetWindowFromIdx(size_t idx) const
return m_pages[idx].window;
}
int wxAuiTabContainer::GetIdxFromWindow(wxWindow* wnd) const
int wxAuiTabContainer::GetIdxFromWindow(const wxWindow* wnd) const
{
const size_t page_count = m_pages.GetCount();
for ( size_t i = 0; i < page_count; ++i )