@@ -241,8 +241,8 @@ public void CloseSubpath()
241241 public bool IsClosed ( )
242242 {
243243 var filteredCount = 0 ;
244- IPathCommand last = null ;
245- IPathCommand first = null ;
244+ IPathCommand ? last = null ;
245+ IPathCommand ? first = null ;
246246 for ( int i = Commands . Count - 1 ; i >= 0 ; i -- )
247247 {
248248 var cmd = Commands [ i ] ;
@@ -376,14 +376,14 @@ public bool IsClosed()
376376 /// Gets a <see cref="PdfRectangle"/> which entirely contains the geometry of the defined path.
377377 /// </summary>
378378 /// <returns>For paths which don't define any geometry this returns <see langword="null"/>.</returns>
379- public static PdfRectangle ? GetBoundingRectangle ( IReadOnlyList < PdfSubpath > path )
379+ public static PdfRectangle ? GetBoundingRectangle ( IReadOnlyList < PdfSubpath > ? path )
380380 {
381381 if ( path == null || path . Count == 0 )
382382 {
383383 return null ;
384384 }
385385
386- var bboxes = path . Select ( x => x . GetBoundingRectangle ( ) ) . Where ( x => x . HasValue ) . Select ( x => x . Value ) . ToList ( ) ;
386+ var bboxes = path . Select ( x => x . GetBoundingRectangle ( ) ) . Where ( x => x . HasValue ) . Select ( x => x ! . Value ) . ToList ( ) ;
387387 if ( bboxes . Count == 0 )
388388 {
389389 return null ;
@@ -433,7 +433,7 @@ public void WriteSvg(StringBuilder builder, double height)
433433 }
434434
435435 /// <inheritdoc />
436- public override bool Equals ( object obj )
436+ public override bool Equals ( object ? obj )
437437 {
438438 return ( obj is Close ) ;
439439 }
@@ -479,7 +479,7 @@ public void WriteSvg(StringBuilder builder, double height)
479479 }
480480
481481 /// <inheritdoc />
482- public override bool Equals ( object obj )
482+ public override bool Equals ( object ? obj )
483483 {
484484 if ( obj is Move move )
485485 {
@@ -545,7 +545,7 @@ public void WriteSvg(StringBuilder builder, double height)
545545 }
546546
547547 /// <inheritdoc />
548- public override bool Equals ( object obj )
548+ public override bool Equals ( object ? obj )
549549 {
550550 if ( obj is Line line )
551551 {
@@ -651,7 +651,7 @@ public override IReadOnlyList<Line> ToLines(int n)
651651 }
652652
653653 /// <inheritdoc />
654- public override bool Equals ( object obj )
654+ public override bool Equals ( object ? obj )
655655 {
656656 if ( obj is QuadraticBezierCurve curve )
657657 {
@@ -809,7 +809,7 @@ public override IReadOnlyList<Line> ToLines(int n)
809809 }
810810
811811 /// <inheritdoc />
812- public override bool Equals ( object obj )
812+ public override bool Equals ( object ? obj )
813813 {
814814 if ( obj is CubicBezierCurve curve )
815815 {
@@ -944,7 +944,7 @@ public static double ValueWithT(double p1, double p2, double p3, double p4, doub
944944 /// <summary>
945945 /// Compares two <see cref="PdfSubpath"/>s for equality. Paths will only be considered equal if the commands which construct the paths are in the same order.
946946 /// </summary>
947- public override bool Equals ( object obj )
947+ public override bool Equals ( object ? obj )
948948 {
949949 if ( ! ( obj is PdfSubpath path ) || Commands . Count != path . Commands . Count )
950950 {
0 commit comments