Skip to content

Commit

Permalink
Remove a redundant operator
Browse files Browse the repository at this point in the history
  • Loading branch information
eyal0 committed Jul 1, 2020
1 parent 9f0c3ba commit b2e515d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions bg_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ template multi_polygon_type_fp operator-(const multi_polygon_type_fp&, const rin

template <typename rhs_t>
multi_polygon_type_fp operator-(const polygon_type_fp& lhs, const rhs_t& rhs) {
if (bg::area(rhs) <= 0) {
auto ret = multi_polygon_type_fp();
ret.push_back(lhs);
return ret;
}
multi_polygon_type_fp ret;
bg::difference(lhs, rhs, ret);
return ret;
return multi_polygon_type_fp{lhs} - rhs;
}

template multi_polygon_type_fp operator-(const polygon_type_fp&, const ring_type_fp&);
Expand Down

0 comments on commit b2e515d

Please sign in to comment.