Skip to content

Commit

Permalink
chore: Warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne committed Dec 14, 2020
1 parent f8df9b8 commit b02c7f2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/Geometry/Mesh.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Paramdigma.Core.Geometry;

namespace Paramdigma.Core.Geometry
{
Expand Down
1 change: 0 additions & 1 deletion src/Geometry/MeshFace.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using Paramdigma.Core.Geometry;

namespace Paramdigma.Core.Geometry
{
Expand Down
2 changes: 0 additions & 2 deletions src/Geometry/MeshPoint.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Paramdigma.Core.Geometry;

namespace Paramdigma.Core.Geometry
{
/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/Geometry/MeshVertex.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using Paramdigma.Core.Geometry;

namespace Paramdigma.Core.Geometry
{
Expand Down
8 changes: 0 additions & 8 deletions src/Geometry/Point3d.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ public double DistanceTo(Point3d point) => Math.Sqrt(
+ Math.Pow(point.Z - this.Z, 2));


/// <inheritdoc />
public override bool Equals(object obj) => base.Equals(obj);


/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();


/// <inheritdoc />
public override string ToString() => "Point3d" + base.ToString();

Expand Down
10 changes: 6 additions & 4 deletions src/Geometry/Polyline2d.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Polyline2d
private bool isClosed;
private List<Line2d> segments;
private bool segmentsNeedUpdate;
private List<Point2d> vertices;
private readonly List<Point2d> vertices;


/// <summary>
Expand All @@ -26,7 +26,8 @@ public Polyline2d(List<Point2d> vertices, bool closed)
this.vertices = vertices;
this.IsClosed =
closed; // Call the property (not the field), to have if add the first point at the end if necessary.
this.RebuildSegments();

this.segmentsNeedUpdate = this.RebuildSegments();
}


Expand All @@ -45,7 +46,7 @@ public List<Line2d> Segments
get
{
if (this.segmentsNeedUpdate)
this.RebuildSegments();
this.segmentsNeedUpdate = this.RebuildSegments();
return this.segments;
}
}
Expand Down Expand Up @@ -196,7 +197,7 @@ public void Reparametrize()
}


private void RebuildSegments()
private bool RebuildSegments()
{
this.segments = new List<Line2d>();
double currentParam = 0;
Expand All @@ -209,6 +210,7 @@ private void RebuildSegments()
}

this.domain = new Interval(0, currentParam);
return false;
}


Expand Down

0 comments on commit b02c7f2

Please sign in to comment.