Skip to content

Commit 8d353b4

Browse files
brunoabinadermourner
authored andcommitted
Fix compiler warning (-Wparentheses) (#46)
1 parent 6623985 commit 8d353b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/mapbox/earcut.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ template <typename N>
666666
bool Earcut<N>::intersects(const Node* p1, const Node* q1, const Node* p2, const Node* q2) {
667667
if ((equals(p1, q1) && equals(p2, q2)) ||
668668
(equals(p1, q2) && equals(p2, q1))) return true;
669-
return area(p1, q1, p2) > 0 != area(p1, q1, q2) > 0 &&
670-
area(p2, q2, p1) > 0 != area(p2, q2, q1) > 0;
669+
return (area(p1, q1, p2) > 0) != (area(p1, q1, q2) > 0) &&
670+
(area(p2, q2, p1) > 0) != (area(p2, q2, q1) > 0);
671671
}
672672

673673
// check if a polygon diagonal intersects any polygon segments

0 commit comments

Comments
 (0)