wxMotif warning fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-08-21 15:10:16 +00:00
parent 20e5860f1f
commit 30d2b71da3

View File

@@ -157,9 +157,6 @@ int wxNotebook::GetRowCount() const
int wxNotebook::SetSelection(size_t nPage) int wxNotebook::SetSelection(size_t nPage)
{ {
if (nPage == -1)
return 0;
wxASSERT( IS_VALID_PAGE(nPage) ); wxASSERT( IS_VALID_PAGE(nPage) );
#if defined (__WIN16__) #if defined (__WIN16__)
@@ -340,18 +337,18 @@ wxWindow* wxNotebook::DoRemovePage(size_t nPage)
{ {
// Only change the selection if the page we // Only change the selection if the page we
// deleted was the selection. // deleted was the selection.
if (nPage == m_nSelection) if (nPage == (size_t)m_nSelection)
{ {
m_nSelection = -1; m_nSelection = -1;
// Select the first tab. Generates a ChangePage. // Select the first tab. Generates a ChangePage.
m_tabView->SetTabSelection((int) (long) GetPage(0), TRUE); m_tabView->SetTabSelection(0, TRUE);
} }
else else
{ {
// We must adjust which tab we think is selected. // We must adjust which tab we think is selected.
// If greater than the page we deleted, it must be moved down // If greater than the page we deleted, it must be moved down
// a notch. // a notch.
if (m_nSelection > nPage) if (size_t(m_nSelection) > nPage)
m_nSelection -- ; m_nSelection -- ;
} }
} }