]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Fix warnings about signed/unsigned comparisons inside wxMax() and friends.
[wxWidgets.git] / src / generic / grid.cpp
index a05a2d519ac37234b4ad0b512c4de1d793bd054e..d60b2c579d4ae8c83676d196c2b75e344e9ad2fc 100644 (file)
@@ -5892,8 +5892,8 @@ void wxGrid::EnableCellEditControl( bool enable )
 
 bool wxGrid::IsCurrentCellReadOnly() const
 {
-    // const_cast
-    wxGridCellAttr* attr = ((wxGrid *)this)->GetCellAttr(m_currentCellCoords);
+    wxGridCellAttr*
+        attr = const_cast<wxGrid *>(this)->GetCellAttr(m_currentCellCoords);
     bool readonly = attr->IsReadOnly();
     attr->DecRef();
 
@@ -7270,7 +7270,7 @@ void wxGrid::CacheAttr(int row, int col, wxGridCellAttr *attr) const
 {
     if ( attr != NULL )
     {
-        wxGrid *self = (wxGrid *)this;  // const_cast
+        wxGrid * const self = const_cast<wxGrid *>(this);
 
         self->ClearAttrCache();
         self->m_attrCache.row = row;
@@ -8164,7 +8164,7 @@ void wxGrid::AutoSizeColLabelSize( int col )
 
 wxSize wxGrid::DoGetBestSize() const
 {
-    wxGrid *self = (wxGrid *)this;  // const_cast
+    wxGrid * const self = const_cast<wxGrid *>(this);
 
     // we do the same as in AutoSize() here with the exception that we don't
     // change the column/row sizes, only calculate them