未验证 提交 6d2c50ac 编写于 作者: C chengpu 提交者: GitHub

Use std::copy to replace forloop assignment (#2087)

Signed-off-by: Nchengpu <chengpu@live.com>
上级 87fc7604
......@@ -475,9 +475,8 @@ GrpcRequestHandler::SearchByID(::grpc::ServerContext* context, const ::milvus::g
// step 1: partition tags
std::vector<std::string> partitions;
for (auto& partition : request->partition_tag_array()) {
partitions.emplace_back(partition);
}
std::copy(request->partition_tag_array().begin(), request->partition_tag_array().end(),
std::back_inserter(partitions));
// step 2: partition tags
std::vector<int64_t> id_array;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册