Refactoring: prefix inc/dec operators for iterators

This commit is contained in:
ntfshard 2015-07-26 23:36:26 +03:00 committed by Alessandro Ranellucci
parent 06913cc8b8
commit f2c4a66e45
5 changed files with 30 additions and 30 deletions

View file

@ -2594,14 +2594,14 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
if (dir == dLeftToRight)
{
maxIt = m_Maxima.begin();
while (maxIt != m_Maxima.end() && *maxIt <= horzEdge->Bot.X) maxIt++;
while (maxIt != m_Maxima.end() && *maxIt <= horzEdge->Bot.X) ++maxIt;
if (maxIt != m_Maxima.end() && *maxIt >= eLastHorz->Top.X)
maxIt = m_Maxima.end();
}
else
{
maxRit = m_Maxima.rbegin();
while (maxRit != m_Maxima.rend() && *maxRit > horzEdge->Bot.X) maxRit++;
while (maxRit != m_Maxima.rend() && *maxRit > horzEdge->Bot.X) ++maxRit;
if (maxRit != m_Maxima.rend() && *maxRit <= eLastHorz->Top.X)
maxRit = m_Maxima.rend();
}
@ -2628,7 +2628,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
{
if (horzEdge->OutIdx >= 0 && !IsOpen)
AddOutPt(horzEdge, IntPoint(*maxIt, horzEdge->Bot.Y));
maxIt++;
++maxIt;
}
}
else
@ -2637,7 +2637,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
{
if (horzEdge->OutIdx >= 0 && !IsOpen)
AddOutPt(horzEdge, IntPoint(*maxRit, horzEdge->Bot.Y));
maxRit++;
++maxRit;
}
}
};