Move Point ctor into .cc file to hide shadowing from users

See #15 and #31.
This commit is contained in:
Jan Niklas Hasse 2021-08-21 17:28:47 +02:00
parent 7f0487a811
commit 136fa7acfc
2 changed files with 5 additions and 1 deletions

View File

@ -35,6 +35,10 @@
namespace p2t { namespace p2t {
Point::Point(double x, double y) : x(x), y(y)
{
}
std::ostream& operator<<(std::ostream& out, const Point& point) { std::ostream& operator<<(std::ostream& out, const Point& point) {
return out << point.x << "," << point.y; return out << point.x << "," << point.y;
} }

View File

@ -57,7 +57,7 @@ struct Point {
std::vector<Edge*> edge_list; std::vector<Edge*> edge_list;
/// Construct using coordinates. /// Construct using coordinates.
Point(double x, double y) : x(x), y(y) {} Point(double x, double y);
/// Set this point to all zeros. /// Set this point to all zeros.
void set_zero() void set_zero()