未验证 提交 2c2021c9 编写于 作者: J Jin Hai 提交者: GitHub

Merge pull request #2047 from AllenYu1987/AllenYu1987-patch-1

Use std::copy to replace forloop assignment
......@@ -12,6 +12,7 @@
#include "server/grpc_impl/GrpcRequestHandler.h"
#include <fiu-local.h>
#include <algorithm>
#include <memory>
#include <string>
#include <unordered_map>
......@@ -460,9 +461,8 @@ GrpcRequestHandler::Search(::grpc::ServerContext* context, const ::milvus::grpc:
// step 2: 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 3: parse extra parameters
milvus::json json_params;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册