X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/962a48f6f991a4924eaf03302988a490e97b2ee5..1914bb8e128d95526e6e2b9b35df3a32b5b0156f:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index e4c865c618..e27d34ae3e 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4183,8 +4183,7 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership, m_table = table; m_table->SetView( this ); - if (takeOwnership) - m_ownTable = true; + m_ownTable = takeOwnership; m_selection = new wxGridSelection( this, selmode ); CalcDimensions(); @@ -7485,8 +7484,8 @@ void wxGrid::DrawTextRectangle( wxDC& dc, int vertAlign, int textOrientation ) { - long textWidth, textHeight; - long lineWidth, lineHeight; + long textWidth = 0, textHeight = 0; + long lineWidth = 0, lineHeight = 0; int nLines; dc.SetClippingRegion( rect ); @@ -7615,7 +7614,7 @@ void wxGrid::GetTextBoxSize( const wxDC& dc, { long w = 0; long h = 0; - long lineW, lineH; + long lineW = 0, lineH = 0; size_t i; for ( i = 0; i < lines.GetCount(); i++ )