@@ -1077,38 +1077,6 @@ private static PointInPolygonResult PointInOpPolygon(Vector2 pt, OutPt op)
10771077 }
10781078 }
10791079
1080- private static bool Path1InsidePath2 ( OutPt op1 , OutPt op2 )
1081- {
1082- // we need to make some accommodation for rounding errors
1083- // so we won't jump if the first vertex is found outside
1084- int outside_cnt = 0 ;
1085- OutPt op = op1 ;
1086- do
1087- {
1088- PointInPolygonResult result = PointInOpPolygon ( op . Point , op2 ) ;
1089- if ( result == PointInPolygonResult . IsOutside )
1090- {
1091- ++ outside_cnt ;
1092- }
1093- else if ( result == PointInPolygonResult . IsInside )
1094- {
1095- -- outside_cnt ;
1096- }
1097-
1098- op = op . Next ;
1099- }
1100- while ( op != op1 && Math . Abs ( outside_cnt ) < 2 ) ;
1101-
1102- if ( Math . Abs ( outside_cnt ) > 1 )
1103- {
1104- return outside_cnt < 0 ;
1105- }
1106-
1107- // since path1's location is still equivocal, check its midpoint
1108- Vector2 mp = GetBounds ( op ) . MidPoint ( ) ;
1109- return PointInOpPolygon ( mp , op2 ) == PointInPolygonResult . IsInside ;
1110- }
1111-
11121080 private void ProcessHorzJoins ( )
11131081 {
11141082 foreach ( HorzJoin j in this . horzJoinList )
@@ -3308,7 +3276,7 @@ private static bool IsFront(Active ae)
33083276
33093277 private struct LocMinSorter : IComparer < LocalMinima >
33103278 {
3311- public int Compare ( LocalMinima locMin1 , LocalMinima locMin2 )
3279+ public readonly int Compare ( LocalMinima locMin1 , LocalMinima locMin2 )
33123280 => locMin2 . Vertex . Point . Y . CompareTo ( locMin1 . Vertex . Point . Y ) ;
33133281 }
33143282
@@ -3359,7 +3327,7 @@ public IntersectNode(Vector2 pt, Active edge1, Active edge2)
33593327
33603328 private struct HorzSegSorter : IComparer < HorzSegment >
33613329 {
3362- public int Compare ( HorzSegment hs1 , HorzSegment hs2 )
3330+ public readonly int Compare ( HorzSegment hs1 , HorzSegment hs2 )
33633331 {
33643332 if ( hs1 == null || hs2 == null )
33653333 {
@@ -3383,7 +3351,7 @@ public int Compare(HorzSegment hs1, HorzSegment hs2)
33833351
33843352 private struct IntersectListSort : IComparer < IntersectNode >
33853353 {
3386- public int Compare ( IntersectNode a , IntersectNode b )
3354+ public readonly int Compare ( IntersectNode a , IntersectNode b )
33873355 {
33883356 if ( a . Point . Y == b . Point . Y )
33893357 {
0 commit comments