src: remove extra copy from Copy() in node_url.cc
The was copying the whole array and the strings in it without any benefit. PR-URL: https://github.com/nodejs/node/pull/14907 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
8850fd4da1
commit
6a0e3b16f3
@ -1007,7 +1007,7 @@ static inline void Copy(Environment* env,
|
||||
}
|
||||
|
||||
static inline Local<Array> Copy(Environment* env,
|
||||
std::vector<std::string> vec) {
|
||||
const std::vector<std::string>& vec) {
|
||||
Isolate* isolate = env->isolate();
|
||||
Local<Array> ary = Array::New(isolate, vec.size());
|
||||
for (size_t n = 0; n < vec.size(); n++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user