From 0c38184d62105dfc9a670e0a0aad92ed5765f233 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 28 Jun 2023 17:38:16 -0400 Subject: [PATCH] src: fix Coverity issue regarding unnecessary copy PR-URL: https://github.com/nodejs/node/pull/48565 Reviewed-By: Luigi Pinca Reviewed-By: Mohammed Keyvanzadeh --- src/node_v8_platform-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_v8_platform-inl.h b/src/node_v8_platform-inl.h index 4e3d6cfe31d9bd..2b06dc982e4a91 100644 --- a/src/node_v8_platform-inl.h +++ b/src/node_v8_platform-inl.h @@ -130,7 +130,7 @@ struct V8Platform { constexpr auto convert_to_set = [](std::vector categories) -> std::set { std::set out; - for (const auto s : categories) { + for (const auto& s : categories) { out.emplace(s); } return out;