mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-31 16:05:30 +08:00
Use emplace_back instead of push_back (#2103)
Signed-off-by: dd-He <1843757857@qq.com>
This commit is contained in:
parent
3c53ee2700
commit
c33df2ee20
@ -158,7 +158,7 @@ IndexHNSW::Query(const DatasetPtr& dataset_ptr, const Config& config) {
|
||||
ret = index_->searchKnn((float*)single_query, k, compare, blacklist);
|
||||
|
||||
while (ret.size() < k) {
|
||||
ret.push_back(std::make_pair(-1, -1));
|
||||
ret.emplace_back(std::make_pair(-1, -1));
|
||||
}
|
||||
std::vector<float> dist;
|
||||
std::vector<int64_t> ids;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user