From baa5d8790f0e69a85ba6fdf383ad06c6e043b207 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 4e3d6cfe31d..2b06dc982e4 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;