Skip to content

Commit cc42db1

Browse files
committed
Clang-tidy likes parentheses
1 parent 0b7f65f commit cc42db1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extract/geometry_util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ double calculate_double_area(const std::vector<osmium::Location>& coordinates) {
1111

1212
for (unsigned i = 1; i < coordinates.size(); ++i) {
1313
auto const cur = coordinates[i];
14-
total += prev.lon() * cur.lat() - cur.lon() * prev.lat();
14+
total += (prev.lon() * cur.lat()) - (cur.lon() * prev.lat());
1515
prev = cur;
1616
}
1717

@@ -26,7 +26,7 @@ double calculate_double_area(const std::vector<osmium::geom::Coordinates>& coord
2626

2727
for (unsigned i = 1; i < coordinates.size(); ++i) {
2828
auto const cur = coordinates[i];
29-
total += prev.x * cur.y - cur.x * prev.y;
29+
total += (prev.x * cur.y) - (cur.x * prev.y);
3030
prev = cur;
3131
}
3232

0 commit comments

Comments
 (0)