Skip to content

Commit 9631587

Browse files
authored
Merge pull request #1505 from joto/misc-cleanup
Various very small changes
2 parents f3fa6e8 + 992d7e3 commit 9631587

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ following:
143143
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
144144
```
145145

146+
Note that `Debug` builds will be much slower than release build. For production
147+
use `Release` or `RelWithDebInfo` builds are recommended.
148+
146149
### Using the PROJ library
147150

148151
Osm2pgsql has builtin support for the Latlong (WGS84, EPSG:4326) and the

src/db-copy.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ void db_copy_thread_t::thread_t::operator()()
129129
// Let commits happen faster by delaying when they actually occur.
130130
m_conn->exec("SET synchronous_commit = off");
131131

132+
// Do not show messages about invalid geometries (they are removed
133+
// by the trigger).
134+
m_conn->exec("SET client_min_messages = WARNING");
135+
132136
bool done = false;
133137
while (!done) {
134138
std::unique_ptr<db_cmd_t> item;

src/thread-pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ std::chrono::milliseconds task_result_t::wait()
1616

1717
// Make sure the result is not 0 so it is different than
1818
// "no result yet".
19-
if (m_result.count() == 0) {
19+
if (m_result == std::chrono::milliseconds::zero()) {
2020
++m_result;
2121
}
2222
}

tests/test-node-locations.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@ TEST_CASE("huge ids should work", "[NoDB]")
8787

8888
REQUIRE(nl.size() == 4);
8989

90+
REQUIRE(nl.get(1ULL) == osmium::Location{1.0, 9.9});
91+
REQUIRE(nl.get(1ULL << 16U) == osmium::Location{1.1, 9.8});
92+
REQUIRE(nl.get(1ULL << 32U) == osmium::Location{1.2, 9.7});
9093
REQUIRE(nl.get(1ULL << 48U) == osmium::Location{1.3, 9.6});
94+
95+
REQUIRE(nl.get(2ULL) == osmium::Location{});
96+
REQUIRE(nl.get(1ULL << 40U) == osmium::Location{});
97+
REQUIRE(nl.get((1ULL << 48U) + 1U) == osmium::Location{});
98+
REQUIRE(nl.get((1ULL << 48U) - 1U) == osmium::Location{});
9199
}
92100

93101
TEST_CASE("full node locations store", "[NoDB]")

0 commit comments

Comments
 (0)