Skip to content

Commit 5877e13

Browse files
committed
[tests] Fix: add const & to prevent calling copy constructor
Coverity CID: 436575
1 parent 75f78c9 commit 5877e13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/memoryPoolAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ struct poolHandleCheck
323323
std::function<std::variant<void *, umf_result_t, size_t>(void)>> {};
324324

325325
TEST_P(poolHandleCheck, poolHandleCheckAll) {
326-
auto f = GetParam();
326+
const auto &f = GetParam();
327327
auto ret = f();
328328

329329
std::visit(

0 commit comments

Comments
 (0)