]> git.saurik.com Git - wxWidgets.git/commitdiff
fix several mingw32 warnings (patch from Tim Stahlhut)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 2 Oct 2007 11:36:35 +0000 (11:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 2 Oct 2007 11:36:35 +0000 (11:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/richtext/richtextsymboldlg.h
include/wx/vector.h
src/common/wxcrt.cpp
src/msw/accel.cpp
src/msw/checklst.cpp

index 19bd1300050e3e28fa2b2823fd16d4ea2e38d827..9f8facaf699139c8fb4e70db2e2d3625b62c4e3c 100644 (file)
@@ -28,7 +28,7 @@
 ////@begin forward declarations
 class wxSymbolListCtrl;
 
-class WXDLLIMPEXP_CORE wxTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
 
 ////@end forward declarations
 
index 8cb76a7ee66f9f04fe5b3272b31d1a99535111f8..6fc0be174a40fdbcca64f096570466fd40fca84e 100644 (file)
@@ -59,9 +59,12 @@ public:
 
         // increase the size twice, unless we're already too big or unless
         // more is requested
-        const size_type increment = (m_size > 0)
-                                     ? wxMin(m_size, ALLOC_MAX_SIZE)
-                                     : ALLOC_INITIAL_SIZE;
+        //
+        // NB: casts to size_t are needed to suppress mingw32 warnings about
+        //     mixing enums and ints in the same expression
+        const size_type increment = m_size > 0
+                                     ? wxMin(m_size, (size_type)ALLOC_MAX_SIZE)
+                                     : (size_type)ALLOC_INITIAL_SIZE;
         if ( m_capacity + increment > n )
             n = m_capacity + increment;
 
index 4b3096aee53384716821efaa2ee29e152c49f621..9c85e471c3f603a8ab271333dca0516c1e68f19d 100644 (file)
@@ -936,9 +936,9 @@ wxCRT_StrtoullBase(const T* nptr, T** endptr, int base, T* sign)
         unsigned int n;
 
         T c = *i;
-        if ( c >= wxT('0') )
+        if ( c >= '0' )
         {
-            if ( c <= wxT('9') )
+            if ( c <= '9' )
                 n = c - wxT('0');
             else
                 n = wxTolower(c) - wxT('a') + 10;
index 5a13ad0fa40071e1992c185fdf5b9c5d6a96c691..2504eeafac5a4e3ab9a46d90ed5ecaf13a0d72d3 100644 (file)
@@ -44,7 +44,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
 
 class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
 {
-    friend class WXDLLEXPORT wxAcceleratorTable;
+    friend class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
 public:
     wxAcceleratorRefData();
     virtual ~wxAcceleratorRefData();
index 65325be752cf765a46e2e08f9392d462489d2ac6..933537bc1b5981d6c6f98a04d0dc5c6d3f20e17c 100644 (file)
@@ -124,7 +124,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
 
 class wxCheckListBoxItem : public wxOwnerDrawn
 {
-friend class WXDLLEXPORT wxCheckListBox;
+friend class WXDLLIMPEXP_FWD_CORE wxCheckListBox;
 public:
     // ctor
     wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex);