# HG changeset patch # User Chris Cannam # Date 1409742345 -3600 # Node ID 57efeb75880d8cb0c43df97c7cf28954b270eb6f # Parent c17719e488c94d1b73ac618886afe245ff4fdaa4 Simplify some logic where loop was used with an unconditional "break" that meant it could only happen once (from coverity scan) diff -r c17719e488c9 -r 57efeb75880d view/PaneStack.cpp --- a/view/PaneStack.cpp Wed Sep 03 12:04:22 2014 +0100 +++ b/view/PaneStack.cpp Wed Sep 03 12:05:45 2014 +0100 @@ -99,10 +99,8 @@ currentIndicator->setVisible(m_showAccessories); int initialCentreFrame = -1; - for (int i = 0; i < (int)m_panes.size(); ++i) { - int f = m_panes[i].pane->getCentreFrame(); - initialCentreFrame = f; - break; + if (!m_panes.empty()) { + initialCentreFrame = m_panes[0].pane->getCentreFrame(); } Pane *pane = new Pane(frame);