5
5
6
6
This file is part of Osmium (https://osmcode.org/libosmium).
7
7
8
- Copyright 2013-2023 Jochen Topf <[email protected] > and others (see README).
8
+ Copyright 2013-2025 Jochen Topf <[email protected] > and others (see README).
9
9
10
10
Boost Software License - Version 1.0 - August 17th, 2003
11
11
@@ -70,7 +70,7 @@ namespace osmium {
70
70
71
71
struct location_to_ring_map {
72
72
osmium::Location location;
73
- open_ring_its_type::iterator ring_it{} ;
73
+ open_ring_its_type::iterator ring_it;
74
74
bool start{false };
75
75
76
76
location_to_ring_map (osmium::Location l, open_ring_its_type::iterator r, const bool s) noexcept :
@@ -217,7 +217,7 @@ namespace osmium {
217
217
}
218
218
}
219
219
220
- for (const osmium::Way* way : ways_in_multiple_rings) {
220
+ for (const osmium::Way* way : ways_in_multiple_rings) { // NOLINT(bugprone-nondeterministic-pointer-iteration-order)
221
221
++m_stats.ways_in_multiple_rings ;
222
222
if (debug ()) {
223
223
std::cerr << " Way " << way->id () << " is in multiple rings\n " ;
@@ -326,7 +326,7 @@ namespace osmium {
326
326
const int64_t ay = a.y ();
327
327
const int64_t by = b.y ();
328
328
const int64_t ly = end_location.y ();
329
- const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax);
329
+ const auto z = (( bx - ax) * (ly - ay)) - (( by - ay) * (lx - ax) );
330
330
if (debug ()) {
331
331
std::cerr << " Segment z=" << z << ' \n ' ;
332
332
}
@@ -353,7 +353,7 @@ namespace osmium {
353
353
const int64_t ay = a.y ();
354
354
const int64_t by = b.y ();
355
355
const int64_t ly = location.y ();
356
- const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax);
356
+ const auto z = (( bx - ax) * (ly - ay)) - (( by - ay) * (lx - ax) );
357
357
358
358
if (z >= 0 ) {
359
359
nesting += segment->is_reverse () ? -1 : 1 ;
@@ -362,7 +362,7 @@ namespace osmium {
362
362
}
363
363
if (segment->ring ()->is_outer ()) {
364
364
const double y = static_cast <double >(ay) +
365
- static_cast <double >((by - ay) * (lx - ax)) / static_cast <double >(bx - ax);
365
+ ( static_cast <double >((by - ay) * (lx - ax)) / static_cast <double >(bx - ax) );
366
366
if (debug ()) {
367
367
std::cerr << " Segment belongs to outer ring (y=" << y << " ring=" << *segment->ring () << " )\n " ;
368
368
}
@@ -703,7 +703,7 @@ namespace osmium {
703
703
704
704
struct candidate {
705
705
int64_t sum;
706
- std::vector<std::pair<location_to_ring_map, bool >> rings{} ;
706
+ std::vector<std::pair<location_to_ring_map, bool >> rings;
707
707
osmium::Location start_location;
708
708
osmium::Location stop_location;
709
709
0 commit comments