File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,11 @@ Napi::Value Fuzzaldrin::setTreeFiltererCandidates(const Napi::CallbackInfo &info
6464 const string childrenKey = info[2 ].As <Napi::String>();
6565
6666 // create Tree and set candidates
67- _tree = Tree (jsTreeArray, dataKey, childrenKey);
67+ _tree = Tree (move_const ( jsTreeArray), move_const ( dataKey), move_const ( childrenKey) );
6868
69- const auto & candidates = _tree.entriesArray ;
69+ const auto candidates = ref ( _tree.entriesArray ) ;
7070
71- const auto N = candidates.size ();// different
71+ const auto N = candidates.get (). size ();// different
7272 const auto num_chunks = N < 1000 * kMaxThreads ? N / 1000 + 1 : kMaxThreads ;
7373 candidates_.clear ();
7474 candidates_.resize (num_chunks);
@@ -80,7 +80,7 @@ Napi::Value Fuzzaldrin::setTreeFiltererCandidates(const Napi::CallbackInfo &info
8080 chunk_size++;
8181 }
8282 for (auto j = cur_start; j < cur_start + chunk_size; j++) {
83- candidates_[i].emplace_back (candidates[j].data );// different // TODO copy
83+ candidates_[i].emplace_back (candidates. get () [j].data );// different // TODO copy
8484 }
8585 cur_start += chunk_size;
8686 }
You can’t perform that action at this time.
0 commit comments