]> git.saurik.com Git - wxWidgets.git/commitdiff
Warning fixes.
authorWłodzimierz Skiba <abx@abx.art.pl>
Fri, 15 Oct 2004 16:00:06 +0000 (16:00 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Fri, 15 Oct 2004 16:00:06 +0000 (16:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/dirctrlg.cpp
src/generic/grid.cpp
src/generic/logg.cpp
src/generic/treectlg.cpp

index 34c0dfe6a9918b2713400b773f3eaf248a1f1f34..6f050c806d8a726151569f71ca11da7ab9594e2d 100644 (file)
@@ -1545,7 +1545,11 @@ static wxBitmap CreateAntialiasedBitmap(const wxImage& img)
             if (smask > 2)
                 ps[0] = ps[1] = ps[2] = mr;
             else
             if (smask > 2)
                 ps[0] = ps[1] = ps[2] = mr;
             else
-                ps[0] = sr >> 2, ps[1] = sg >> 2, ps[2] = sb >> 2;
+            {
+                ps[0] = (unsigned char)(sr >> 2);
+                ps[1] = (unsigned char)(sg >> 2);
+                ps[2] = (unsigned char)(sb >> 2);
+            }
             ps += 3;
         }
         p1 += size*2 * 3, p2 += size*2 * 3;
             ps += 3;
         }
         p1 += size*2 * 3, p2 += size*2 * 3;
index 559c317274ea691f894d3594d8324d96b922c7e9..b21a13d44b48797fc0cd02566648551d88baf750 100644 (file)
@@ -1183,10 +1183,10 @@ bool wxGridCellFloatEditor::IsAcceptedKey(wxKeyEvent& event)
                 char tmpbuf[2];
                 tmpbuf[0] = (char) keycode;
                 tmpbuf[1] = '\0';
                 char tmpbuf[2];
                 tmpbuf[0] = (char) keycode;
                 tmpbuf[1] = '\0';
-                bool is_decimal_point =
-                  ( wxString(tmpbuf, *wxConvCurrent) ==
-                    wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,
-                                      wxLOCALE_CAT_NUMBER) );
+                wxString strbuf(tmpbuf, *wxConvCurrent);
+                bool is_decimal_point = 
+                    ( strbuf == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,
+                                                  wxLOCALE_CAT_NUMBER) );
                 if ( (keycode < 128) &&
                      (wxIsdigit(keycode) || tolower(keycode) == 'e' ||
                       is_decimal_point || keycode == '+' || keycode == '-') )
                 if ( (keycode < 128) &&
                      (wxIsdigit(keycode) || tolower(keycode) == 'e' ||
                       is_decimal_point || keycode == '+' || keycode == '-') )
@@ -9546,26 +9546,30 @@ void wxGrid::SetColSize( int col, int width )
 void wxGrid::SetColMinimalWidth( int col, int width )
 {
     if (width > GetColMinimalAcceptableWidth()) {
 void wxGrid::SetColMinimalWidth( int col, int width )
 {
     if (width > GetColMinimalAcceptableWidth()) {
-        m_colMinWidths[col] = width;
+        wxLongToLongHashMap::const_key_type key = (wxLongToLongHashMap::const_key_type)col;
+        m_colMinWidths[key] = width;
     }
 }
 
 void wxGrid::SetRowMinimalHeight( int row, int width )
 {
     if (width > GetRowMinimalAcceptableHeight()) {
     }
 }
 
 void wxGrid::SetRowMinimalHeight( int row, int width )
 {
     if (width > GetRowMinimalAcceptableHeight()) {
-       m_rowMinHeights[row] = width;
+        wxLongToLongHashMap::const_key_type key = (wxLongToLongHashMap::const_key_type)row;
+        m_rowMinHeights[key] = width;
     }
 }
 
 int wxGrid::GetColMinimalWidth(int col) const
 {
     }
 }
 
 int wxGrid::GetColMinimalWidth(int col) const
 {
-    wxLongToLongHashMap::const_iterator it = m_colMinWidths.find(col);
+    wxLongToLongHashMap::const_key_type key = (wxLongToLongHashMap::const_key_type)col;
+    wxLongToLongHashMap::const_iterator it = m_colMinWidths.find(key);
     return it != m_colMinWidths.end() ? (int)it->second : m_minAcceptableColWidth;
 }
 
 int wxGrid::GetRowMinimalHeight(int row) const
 {
     return it != m_colMinWidths.end() ? (int)it->second : m_minAcceptableColWidth;
 }
 
 int wxGrid::GetRowMinimalHeight(int row) const
 {
-    wxLongToLongHashMap::const_iterator it = m_rowMinHeights.find(row);
+    wxLongToLongHashMap::const_key_type key = (wxLongToLongHashMap::const_key_type)row;
+    wxLongToLongHashMap::const_iterator it = m_rowMinHeights.find(key);
     return it != m_rowMinHeights.end() ? (int)it->second : m_minAcceptableRowHeight;
 }
 
     return it != m_rowMinHeights.end() ? (int)it->second : m_minAcceptableRowHeight;
 }
 
index a0b7a1aa5cf5544c3c4035dc8542c75e6ea7bf40..668a0cabf7d55702998595f82cefd6800d802cf6 100644 (file)
@@ -252,7 +252,7 @@ void wxLogGui::Flush()
 
     wxString appName = wxTheApp->GetAppName();
     if ( !!appName )
 
     wxString appName = wxTheApp->GetAppName();
     if ( !!appName )
-        appName[0u] = wxToupper(appName[0u]);
+        appName[0u] = (wxChar)wxToupper(appName[0u]);
 
     long style;
     wxString titleFormat;
 
     long style;
     wxString titleFormat;
index b733643760a81c3fcac5f3891b7a6a1063b02dfb..d8017cd81c89e9db77fdc173dead8b0d84f9b427 100644 (file)
@@ -261,12 +261,12 @@ private:
 
     // tree ctrl images for the normal, selected, expanded and
     // expanded+selected states
 
     // tree ctrl images for the normal, selected, expanded and
     // expanded+selected states
-    short               m_images[wxTreeItemIcon_Max];
+    int                 m_images[wxTreeItemIcon_Max];
 
     wxCoord             m_x;            // (virtual) offset from top
     wxCoord             m_y;            // (virtual) offset from left
 
     wxCoord             m_x;            // (virtual) offset from top
     wxCoord             m_y;            // (virtual) offset from left
-    short               m_width;        // width of this item
-    unsigned char       m_height;       // height of this item
+    int                 m_width;        // width of this item
+    int                 m_height;       // height of this item
 
     // use bitfields to save size
     int                 m_isCollapsed :1;
 
     // use bitfields to save size
     int                 m_isCollapsed :1;