Skip to content

Commit a850ffd

Browse files
committed
fix: remove indirection of thread_worker_filter
1 parent ad842cb commit a850ffd

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/filter.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,6 @@ void filter_internal(const std::vector<CandidateString> &candidates,
4040
}
4141
}
4242

43-
void thread_worker_filter(const std::vector<CandidateString> &candidates,
44-
size_t start_index,
45-
const Element &query,
46-
const Options &options,
47-
size_t max_results,
48-
CandidateScorePriorityQueue &results) {
49-
filter_internal(candidates, start_index, query, options, max_results, results);
50-
}
51-
5243
std::vector<CandidateIndex> sort_priority_queue(CandidateScorePriorityQueue &&candidates) {
5344
vector<CandidateScore> sorted;
5445
std::vector<CandidateIndex> ret;
@@ -89,7 +80,7 @@ std::vector<CandidateIndex> filter(const vector<std::vector<CandidateString>> &c
8980
for (size_t i = 1; i < candidates_size; i++) {
9081
assert(1 < i && i < candidates.size() && i < results.size());
9182
start_index += candidates[i - 1].size();//inbounds
92-
threads.emplace_back(thread_worker_filter, ref(candidates[i]), start_index, ref(query), ref(options), max_results, ref(results[i]));// inbounds
83+
threads.emplace_back(filter_internal, ref(candidates[i]), start_index, ref(query), ref(options), max_results, ref(results[i]));// inbounds
9384
}
9485

9586
assert(threads.size() == candidates.size() && results.size() == candidates.size());

0 commit comments

Comments
 (0)