X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86909f4c893e043dd3695d7510f2cc758e8b2cfb..1abfa172c547a37751e598084fb8d541071471a3:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index ed30da1d39..3b1a77280a 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1376,8 +1376,8 @@ wxFlexGridSizer::~wxFlexGridSizer() void wxFlexGridSizer::RecalcSizes() { - int nitems, nrows, ncols; - if ( (nitems = CalcRowsCols(nrows, ncols)) == 0 ) + int nrows, ncols; + if ( !CalcRowsCols(nrows, ncols) ) return; const wxPoint pt(GetPosition()); @@ -1711,8 +1711,13 @@ void wxBoxSizer::RecalcSizes() if ( !item->IsShown() ) continue; - - const wxSize sizeThis(item->GetMinSizeWithBorder()); +#ifndef __DMC__ + // DMC doesn't distinguish between + // int SizeInMajorDir(const wxSize& sz) const + // and int& SizeInMajorDir(wxSize& sz) + const +#endif + wxSize sizeThis(item->GetMinSizeWithBorder()); // adjust the size in the major direction using the proportion @@ -1782,8 +1787,10 @@ wxSize wxBoxSizer::CalcMin() if ( !item->IsShown() ) continue; - - const wxSize sizeMinThis = item->CalcMin(); +#ifndef __DMC__ + const // see __DMC__ above +#endif + wxSize sizeMinThis = item->CalcMin(); SizeInMajorDir(m_minSize) += SizeInMajorDir(sizeMinThis); if ( SizeInMinorDir(sizeMinThis) > SizeInMinorDir(m_minSize) )