X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..1e52188741389278cd99abf79218162c87024ba3:/src/univ/notebook.cpp diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 26916b958d..408034a35e 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -40,7 +40,7 @@ // macros // ---------------------------------------------------------------------------- -#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) +#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((size_t(nPage)) < GetPageCount())) // ---------------------------------------------------------------------------- // constants @@ -133,14 +133,14 @@ bool wxNotebook::Create(wxWindow *parent, // wxNotebook page titles and images // ---------------------------------------------------------------------------- -wxString wxNotebook::GetPageText(int nPage) const +wxString wxNotebook::GetPageText(size_t nPage) const { wxCHECK_MSG( IS_VALID_PAGE(nPage), _T(""), _T("invalid notebook page") ); return m_titles[nPage]; } -bool wxNotebook::SetPageText(int nPage, const wxString& strText) +bool wxNotebook::SetPageText(size_t nPage, const wxString& strText) { wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") ); @@ -163,14 +163,14 @@ bool wxNotebook::SetPageText(int nPage, const wxString& strText) return TRUE; } -int wxNotebook::GetPageImage(int nPage) const +int wxNotebook::GetPageImage(size_t nPage) const { wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") ); return m_images[nPage]; } -bool wxNotebook::SetPageImage(int nPage, int nImage) +bool wxNotebook::SetPageImage(size_t nPage, int nImage) { wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") ); @@ -202,7 +202,7 @@ wxNotebook::~wxNotebook() // wxNotebook page switching // ---------------------------------------------------------------------------- -int wxNotebook::SetSelection(int nPage) +int wxNotebook::SetSelection(size_t nPage) { wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") ); @@ -277,13 +277,13 @@ int wxNotebook::SetSelection(int nPage) // wxNotebook pages adding/deleting // ---------------------------------------------------------------------------- -bool wxNotebook::InsertPage(int nPage, +bool wxNotebook::InsertPage(size_t nPage, wxNotebookPage *pPage, const wxString& strText, bool bSelect, int imageId) { - int nPages = GetPageCount(); + size_t nPages = GetPageCount(); wxCHECK_MSG( nPage == nPages || IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page in InsertPage()") ); @@ -360,7 +360,7 @@ bool wxNotebook::DeleteAllPages() return TRUE; } -wxNotebookPage *wxNotebook::DoRemovePage(int nPage) +wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage) { wxCHECK_MSG( IS_VALID_PAGE(nPage), NULL, _T("invalid notebook page") ); @@ -381,7 +381,7 @@ wxNotebookPage *wxNotebook::DoRemovePage(int nPage) UpdateSpinBtn(); } - int count = GetPageCount(); + size_t count = GetPageCount(); if ( count ) { if ( m_sel == (size_t)nPage )