File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
106106 dist_t dist = fstdistfunc_ (query_data, data_ + size_per_element_ * i, dist_func_param_);
107107 labeltype label = *((labeltype*) (data_ + size_per_element_ * i + data_size_));
108108 if ((!isIdAllowed) || (*isIdAllowed)(label)) {
109- topResults.push (std::pair< dist_t , labeltype>( dist, label) );
109+ topResults.emplace ( dist, label);
110110 }
111111 }
112112 dist_t lastdist = topResults.empty () ? std::numeric_limits<dist_t >::max () : topResults.top ().first ;
@@ -115,7 +115,7 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
115115 if (dist <= lastdist) {
116116 labeltype label = *((labeltype *) (data_ + size_per_element_ * i + data_size_));
117117 if ((!isIdAllowed) || (*isIdAllowed)(label)) {
118- topResults.push (std::pair< dist_t , labeltype>( dist, label) );
118+ topResults.emplace ( dist, label);
119119 }
120120 if (topResults.size () > k)
121121 topResults.pop ();
You can’t perform that action at this time.
0 commit comments