Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better debug assertions
Browse files Browse the repository at this point in the history
roji committed Jan 17, 2019

Verified

This commit was signed with the committer’s verified signature.
mattgodbolt Matt Godbolt
1 parent b27ac38 commit 1f5699e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NetTopologySuite.IO.PostGis/PostGisWriter.cs
Original file line number Diff line number Diff line change
@@ -149,13 +149,13 @@ private static void Write(ICoordinateSequence sequence, Ordinates ordinates, Bin
if ((ordinates & Ordinates.Z) != 0)
{
double z = sequence.GetOrdinate(i, Ordinate.Z);
Debug.Assert(!double.IsNaN(z));
Debug.Assert(!double.IsNaN(z), "Geom seemed to have a Z coordinate, but trying to get the value yielded NaN");
writer.Write(z);
}
if ((ordinates & Ordinates.M) != 0)
{
double m = sequence.GetOrdinate(i, Ordinate.M);
Debug.Assert(!double.IsNaN(m));
Debug.Assert(!double.IsNaN(m), "Geom seemed to have a M coordinate, but trying to get the value yielded NaN");
writer.Write(m);
}
}

0 comments on commit 1f5699e

Please sign in to comment.