aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/impl/codegen/async_stream.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-10-12 14:33:45 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2018-10-16 14:10:30 -0700
commit6fb7bd23bf05b89394ed5ae6e8f60332d0f02fc6 (patch)
treec752b11cc0128ec7a342def2133c4c32772f4001 /include/grpcpp/impl/codegen/async_stream.h
parent6f05a711e651196672450693493dee181368697d (diff)
s/GPR_ASSERT/GPR_CODEGEN_ASSERT and few more bugs
Diffstat (limited to 'include/grpcpp/impl/codegen/async_stream.h')
-rw-r--r--include/grpcpp/impl/codegen/async_stream.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/include/grpcpp/impl/codegen/async_stream.h b/include/grpcpp/impl/codegen/async_stream.h
index 258b73535e..6e58fd0eef 100644
--- a/include/grpcpp/impl/codegen/async_stream.h
+++ b/include/grpcpp/impl/codegen/async_stream.h
@@ -188,7 +188,7 @@ class ClientAsyncReaderFactory {
::grpc::internal::Call call = channel->CreateCall(method, context, cq);
return new (g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(ClientAsyncReader<R>)))
- ClientAsyncReader<R>(std::move(call), context, request, start, tag);
+ ClientAsyncReader<R>(call, context, request, start, tag);
}
};
} // namespace internal
@@ -264,7 +264,7 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
template <class W>
ClientAsyncReader(::grpc::internal::Call call, ClientContext* context,
const W& request, bool start, void* tag)
- : context_(context), call_(std::move(call)), started_(start) {
+ : context_(context), call_(call), started_(start) {
// TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(init_ops_.SendMessage(request).ok());
init_ops_.ClientSendClose();
@@ -336,7 +336,7 @@ class ClientAsyncWriterFactory {
::grpc::internal::Call call = channel->CreateCall(method, context, cq);
return new (g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(ClientAsyncWriter<W>)))
- ClientAsyncWriter<W>(std::move(call), context, response, start, tag);
+ ClientAsyncWriter<W>(call, context, response, start, tag);
}
};
} // namespace internal
@@ -430,7 +430,7 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
template <class R>
ClientAsyncWriter(::grpc::internal::Call call, ClientContext* context,
R* response, bool start, void* tag)
- : context_(context), call_(std::move(call)), started_(start) {
+ : context_(context), call_(call), started_(start) {
finish_ops_.RecvMessage(response);
finish_ops_.AllowNoMessage();
if (start) {
@@ -501,7 +501,7 @@ class ClientAsyncReaderWriterFactory {
return new (g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(ClientAsyncReaderWriter<W, R>)))
- ClientAsyncReaderWriter<W, R>(std::move(call), context, start, tag);
+ ClientAsyncReaderWriter<W, R>(call, context, start, tag);
}
};
} // namespace internal
@@ -603,7 +603,7 @@ class ClientAsyncReaderWriter final
friend class internal::ClientAsyncReaderWriterFactory<W, R>;
ClientAsyncReaderWriter(::grpc::internal::Call call, ClientContext* context,
bool start, void* tag)
- : context_(context), call_(std::move(call)), started_(start) {
+ : context_(context), call_(call), started_(start) {
if (start) {
StartCallInternal(tag);
} else {
@@ -781,10 +781,7 @@ class ServerAsyncReader final : public ServerAsyncReaderInterface<W, R> {
}
private:
- ::grpc::internal::Call* BindCall(::grpc::internal::Call call) override {
- call_ = std::move(call);
- return &call_;
- }
+ void BindCall(::grpc::internal::Call* call) override { call_ = *call; }
::grpc::internal::Call call_;
ServerContext* ctx_;
@@ -930,10 +927,7 @@ class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> {
}
private:
- ::grpc::internal::Call* BindCall(::grpc::internal::Call call) override {
- call_ = std::move(call);
- return &call_;
- }
+ void BindCall(::grpc::internal::Call* call) override { call_ = *call; }
template <class T>
void EnsureInitialMetadataSent(T* ops) {
@@ -1107,10 +1101,7 @@ class ServerAsyncReaderWriter final
private:
friend class ::grpc::Server;
- ::grpc::internal::Call* BindCall(::grpc::internal::Call call) override {
- call_ = std::move(call);
- return &call_;
- }
+ void BindCall(::grpc::internal::Call* call) override { call_ = *call; }
template <class T>
void EnsureInitialMetadataSent(T* ops) {