From da20a50242716da306cd09c10b88c0e31c3b7511 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sat, 14 Dec 2024 19:45:54 +0100 Subject: [PATCH] Avoid copying parameters --- test/t/index/test_dump_and_load_index.cpp | 2 +- test/t/tags/test_filter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/t/index/test_dump_and_load_index.cpp b/test/t/index/test_dump_and_load_index.cpp index 3d0c0f1f..be855069 100644 --- a/test/t/index/test_dump_and_load_index.cpp +++ b/test/t/index/test_dump_and_load_index.cpp @@ -16,7 +16,7 @@ using sparse_file_array = osmium::index::map::SparseFileArray -void test_index(std::function dump_method) { +void test_index(const std::function& dump_method) { const int fd = osmium::detail::create_tmp_file(); REQUIRE(osmium::file_size(fd) == 0); const osmium::unsigned_object_id_type id1 = 12; diff --git a/test/t/tags/test_filter.cpp b/test/t/tags/test_filter.cpp index 8753a93d..15007d66 100644 --- a/test/t/tags/test_filter.cpp +++ b/test/t/tags/test_filter.cpp @@ -18,7 +18,7 @@ namespace { template void check_filter(const osmium::TagList& tag_list, - const TFilter filter, + const TFilter& filter, const std::vector& reference) { REQUIRE(tag_list.size() == reference.size()); auto t_it = tag_list.begin();