X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/259c43f679ca655362b5a439e11c87fc0666d663..94113cc55572d23b2c86b9140543d32858c1eee6:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 892ae3ebcf..5db2c30222 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -20,6 +20,7 @@ #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/intl.h" + #include "wx/math.h" #endif // WX_PRECOMP #include "wx/sizer.h" @@ -265,7 +266,7 @@ wxSize wxSizerItem::CalcMin() // if we have to preserve aspect ratio _AND_ this is // the first-time calculation, consider ret to be initial size - if ((m_flag & wxSHAPED) && !m_ratio) + if ( (m_flag & wxSHAPED) && wxIsNullDouble(m_ratio) ) SetRatio(m_minSize); } else if ( IsWindow() ) @@ -1323,10 +1324,12 @@ void wxFlexGridSizer::AdjustForFlexDirection() wxArrayInt& array = m_flexDirection == wxVERTICAL ? m_colWidths : m_rowHeights; - const int count = array.GetCount(); + const size_t count = array.GetCount(); // find the largest value in this array - int n, largest = 0; + size_t n; + int largest = 0; + for ( n = 0; n < count; ++n ) { if ( array[n] > largest )