Use "for" loop in wxHtmlContainerCell::AdjustPagebreak()

Use a simpler form for iterating over all children.

No real changes.
This commit is contained in:
Vadim Zeitlin
2018-05-21 17:14:29 +02:00
parent 9544d102dd
commit a56b993c55

View File

@@ -704,15 +704,13 @@ wxHtmlContainerCell::AdjustPagebreak(int *pagebreak,
if (!m_CanLiveOnPagebreak)
return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks, pageHeight);
wxHtmlCell *c = GetFirstChild();
bool rt = false;
int pbrk = *pagebreak - m_PosY;
while (c)
for ( wxHtmlCell *c = GetFirstChild(); c; c = c->GetNext() )
{
if (c->AdjustPagebreak(&pbrk, known_pagebreaks, pageHeight))
rt = true;
c = c->GetNext();
}
if (rt)
*pagebreak = pbrk + m_PosY;