mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
EdgeTable: Fix assertion caused by unnecessarily storing prepending zero levels
This partially restores the behaviour prior to commit
dda0719d56, in that we will never store a
segment if its level equals the last stored level.
This commit is contained in:
parent
adeac2a2ea
commit
83720ac462
1 changed files with 2 additions and 3 deletions
|
|
@ -549,7 +549,7 @@ void EdgeTable::intersectWithEdgeTableLine (const int y, const int* const otherL
|
|||
|
||||
int destIndex = 0, destTotal = 0;
|
||||
int level1 = 0, level2 = 0;
|
||||
int lastX = std::numeric_limits<int>::min(), lastLevel = 0;
|
||||
int lastLevel = 0;
|
||||
|
||||
while (! srcLine1.empty() && ! srcLine2.empty())
|
||||
{
|
||||
|
|
@ -579,7 +579,7 @@ void EdgeTable::intersectWithEdgeTableLine (const int y, const int* const otherL
|
|||
|
||||
const auto nextLevel = (level1 * (level2 + 1)) / scale;
|
||||
|
||||
if (std::exchange (lastX, nextX) < nextX || std::exchange (lastLevel, nextLevel) != nextLevel)
|
||||
if (std::exchange (lastLevel, nextLevel) != nextLevel)
|
||||
{
|
||||
jassert (isPositiveAndBelow (nextLevel, 256));
|
||||
|
||||
|
|
@ -606,7 +606,6 @@ void EdgeTable::intersectWithEdgeTableLine (const int y, const int* const otherL
|
|||
}
|
||||
|
||||
++destTotal;
|
||||
lastLevel = nextLevel;
|
||||
|
||||
if (! isUsingTempSpace)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue