Skip to content

Commit 95bac60

Browse files
committed
Avoid narrowing conversions
1 parent 4915784 commit 95bac60

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/t/handler/test_apply.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ TEST_CASE("apply with lambdas on reader") {
1313
const osmium::io::File file{with_data_dir("t/relations/data.osm")};
1414
osmium::io::Reader reader{file};
1515

16-
int count_n = 0;
17-
int count_w = 0;
18-
int count_r = 0;
19-
int count_o = 0;
20-
int count_a = 0;
16+
uint64_t count_n = 0;
17+
uint64_t count_w = 0;
18+
uint64_t count_r = 0;
19+
uint64_t count_o = 0;
20+
uint64_t count_a = 0;
2121

2222
osmium::apply(reader,
2323
[&](const osmium::Node& node) {

test/t/osm/test_location.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ TEST_CASE("Location hash") {
161161
if (sizeof(size_t) == 8) {
162162
REQUIRE(std::hash<osmium::Location>{}({0, 0}) == 0);
163163
REQUIRE(std::hash<osmium::Location>{}({0, 1}) == 1);
164-
const int64_t a = std::hash<osmium::Location>{}({1, 0});
164+
const auto a = std::hash<osmium::Location>{}({1, 0});
165165
REQUIRE(a == 0x100000000);
166-
const int64_t b = std::hash<osmium::Location>{}({1, 1});
166+
const auto b = std::hash<osmium::Location>{}({1, 1});
167167
REQUIRE(b == 0x100000001);
168168
} else {
169169
REQUIRE(std::hash<osmium::Location>{}({0, 0}) == 0);

0 commit comments

Comments
 (0)