]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/notebook.cpp
IsInAssert is only available (and only makes sense) in a debug build so
[wxWidgets.git] / src / univ / notebook.cpp
index cb5bfd045b5b20da06e16f255f439b5fa6650013..5de122ecf111f053a2940f708ea364b1e4e3a614 100644 (file)
     #pragma implementation "univnotebook.h"
 #endif
 
+#ifdef __VMS
+#pragma message disable unscomzer
+#endif
+
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 // macros
 // ----------------------------------------------------------------------------
 
-#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
+#if 0
+// due to unsigned type nPage is always >= 0
+#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((size_t(nPage)) < GetPageCount()))
+#else
+#define IS_VALID_PAGE(nPage) ((size_t(nPage)) < GetPageCount())
+#endif
 
 // ----------------------------------------------------------------------------
 // constants
@@ -93,6 +102,23 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
 // wxNotebook creation
 // ----------------------------------------------------------------------------
 
+wxNotebook::wxNotebook()
+{
+    Init();
+}
+
+wxNotebook::wxNotebook(wxWindow *parent,
+                       wxWindowID id,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       long style,
+                       const wxString& name)
+{
+    Init();
+
+    (void)Create(parent, id, pos, size, style, name);
+}
+
 void wxNotebook::Init()
 {
     m_sel = INVALID_PAGE;
@@ -381,7 +407,7 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
         UpdateSpinBtn();
     }
 
-    int count = GetPageCount();
+    size_t count = GetPageCount();
     if ( count )
     {
         if ( m_sel == (size_t)nPage )