Use "for" loop in wxHtmlContainerCell::AdjustPagebreak()
Use a simpler form for iterating over all children. No real changes.
This commit is contained in:
@@ -704,15 +704,13 @@ wxHtmlContainerCell::AdjustPagebreak(int *pagebreak,
|
|||||||
if (!m_CanLiveOnPagebreak)
|
if (!m_CanLiveOnPagebreak)
|
||||||
return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks, pageHeight);
|
return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks, pageHeight);
|
||||||
|
|
||||||
wxHtmlCell *c = GetFirstChild();
|
|
||||||
bool rt = false;
|
bool rt = false;
|
||||||
int pbrk = *pagebreak - m_PosY;
|
int pbrk = *pagebreak - m_PosY;
|
||||||
|
|
||||||
while (c)
|
for ( wxHtmlCell *c = GetFirstChild(); c; c = c->GetNext() )
|
||||||
{
|
{
|
||||||
if (c->AdjustPagebreak(&pbrk, known_pagebreaks, pageHeight))
|
if (c->AdjustPagebreak(&pbrk, known_pagebreaks, pageHeight))
|
||||||
rt = true;
|
rt = true;
|
||||||
c = c->GetNext();
|
|
||||||
}
|
}
|
||||||
if (rt)
|
if (rt)
|
||||||
*pagebreak = pbrk + m_PosY;
|
*pagebreak = pbrk + m_PosY;
|
||||||
|
Reference in New Issue
Block a user