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 @@ -112,7 +112,7 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
112112 dist_t dist = fstdistfunc_ (query_data, data_ + size_per_element_ * i, dist_func_param_);
113113 labeltype label = *((labeltype*) (data_ + size_per_element_ * i + data_size_));
114114 if ((!isIdAllowed) || (*isIdAllowed)(label)) {
115- topResults.push (std::pair< dist_t , labeltype>( dist, label) );
115+ topResults.emplace ( dist, label);
116116 }
117117 }
118118 dist_t lastdist = topResults.empty () ? std::numeric_limits<dist_t >::max () : topResults.top ().first ;
@@ -121,7 +121,7 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
121121 if (dist <= lastdist) {
122122 labeltype label = *((labeltype *) (data_ + size_per_element_ * i + data_size_));
123123 if ((!isIdAllowed) || (*isIdAllowed)(label)) {
124- topResults.push (std::pair< dist_t , labeltype>( dist, label) );
124+ topResults.emplace ( dist, label);
125125 }
126126 if (topResults.size () > k)
127127 topResults.pop ();
You can’t perform that action at this time.
0 commit comments