Skip to content

Commit

Permalink
In CairoExtensions, swapped values using tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehonti committed Dec 18, 2023
1 parent 395529d commit 11eb835
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Pinta.Core/Extensions/CairoExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,7 @@ public static ImmutableArray<Scanline> GetScans (this ReadOnlySpan<PointI> point
int dy;

if (top.Y > bottom.Y) {
PointI temp = top;
top = bottom;
bottom = temp;
(bottom, top) = (top, bottom);
}

dy = bottom.Y - top.Y;
Expand All @@ -750,9 +748,7 @@ public static ImmutableArray<Scanline> GetScans (this ReadOnlySpan<PointI> point
min = j;

if (min != i) {
Edge temp = edgeTable[min];
edgeTable[min] = edgeTable[i];
edgeTable[i] = temp;
(edgeTable[i], edgeTable[min]) = (edgeTable[min], edgeTable[i]);
}
}

Expand Down Expand Up @@ -824,9 +820,7 @@ public static ImmutableArray<Scanline> GetScans (this ReadOnlySpan<PointI> point
min = j;

if (min != i) {
int temp = active[min];
active[min] = active[i];
active[i] = temp;
(active[i], active[min]) = (active[min], active[i]);
}
}

Expand Down

0 comments on commit 11eb835

Please sign in to comment.