Skip to content

Commit

Permalink
Fix checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ediardi committed Jun 3, 2024
1 parent 71356ce commit 2306af1
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Triangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ void Triangle::set_c(const Point& point_c) {
}

Triangle::Triangle() = default ;
Triangle::Triangle(const Triangle &other): a(other.a), b(other.b), c(other.c) {
//just to bypass =default suggestion/warning
a=other.a;
}
Triangle::Triangle(const Triangle &other) = default;

bool Triangle::does_not_intersect_triangle(const Triangle& other) const{
Line other_ab= Line(other.a,other.b);
Expand All @@ -89,14 +86,7 @@ std::ostream &operator<<(std::ostream &os, const Triangle &triangle) {
return os;
}

Triangle &Triangle::operator=(const Triangle &other) {
a=other.a;
b=other.b;
c=other.c;
//to avoid warning
c=other.c;
return *this;
}
Triangle &Triangle::operator=(const Triangle &other) = default;

Triangle::~Triangle() = default;

Expand Down

0 comments on commit 2306af1

Please sign in to comment.