]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
stricter reply code checking: verify that we get the expected reply, not just that...
[wxWidgets.git] / src / common / sizer.cpp
index 206f09a255ff4ee3fe6ea8ec7b881580abf30f38..beb46796bc4b0a8cb479376d27a814cb06893709 100644 (file)
@@ -17,7 +17,6 @@
     #pragma hdrstop
 #endif
 
-#include "wx/display.h"
 #include "wx/sizer.h"
 #include "wx/private/flagscheck.h"
 
@@ -32,6 +31,7 @@
     #include "wx/toplevel.h"
 #endif // WX_PRECOMP
 
+#include "wx/display.h"
 #include "wx/listimpl.cpp"
 
 
@@ -1631,11 +1631,9 @@ wxSize wxFlexGridSizer::CalcMin()
     m_rowHeights.assign(nrows, -1);
     m_colWidths.assign(ncols, -1);
 
-    // n is the index of the item in left-to-right top-to-bottom order
-    size_t n = 0;
     for ( wxSizerItemList::iterator i = m_children.begin();
           i != m_children.end();
-          ++i, ++n )
+          ++i)
     {
         wxSizerItem * const item = *i;
         if ( item->IsShown() )
@@ -1789,21 +1787,21 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz)
         {
             const int col = n % ncols;
             didAdjustMinSize |= (*i)->InformFirstDirection(wxHORIZONTAL, m_colWidths[col], sz.y - m_calculatedMinSize.y);
-    }
+        }
 
         // Only redo if info was actually used
         if( didAdjustMinSize )
-    {
-        DoAdjustForGrowables
-        (
-            sz.x - m_calculatedMinSize.x,
-            m_growableCols,
-            m_colWidths,
-            m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableColsProportions
-                                                    : NULL
-        );
+        {
+            DoAdjustForGrowables
+            (
+                sz.x - m_calculatedMinSize.x,
+                m_growableCols,
+                m_colWidths,
+                m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableColsProportions
+                                                        : NULL
+            );
+        }
     }
-}
 
     if ( (m_flexDirection & wxVERTICAL) || (m_growMode != wxFLEX_GROWMODE_NONE) )
     {