0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-28 06:28:40 +01:00

src: fix Coverity issue regarding unnecessary copy

PR-URL: https://github.com/nodejs/node/pull/48565
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
Yagiz Nizipli 2023-06-28 17:38:16 -04:00 committed by GitHub
parent 6ffacbf0f9
commit baa5d8790f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ struct V8Platform {
constexpr auto convert_to_set =
[](std::vector<std::string_view> categories) -> std::set<std::string> {
std::set<std::string> out;
for (const auto s : categories) {
for (const auto& s : categories) {
out.emplace(s);
}
return out;