summaryrefslogtreecommitdiff
path: root/grpc/include/grpcpp/impl/codegen/interceptor_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/include/grpcpp/impl/codegen/interceptor_common.h')
-rw-r--r--grpc/include/grpcpp/impl/codegen/interceptor_common.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/grpc/include/grpcpp/impl/codegen/interceptor_common.h b/grpc/include/grpcpp/impl/codegen/interceptor_common.h
index 520d9814..b9a6eded 100644
--- a/grpc/include/grpcpp/impl/codegen/interceptor_common.h
+++ b/grpc/include/grpcpp/impl/codegen/interceptor_common.h
@@ -223,18 +223,11 @@ class InterceptorBatchMethodsImpl
bool InterceptorsListEmpty() {
auto* client_rpc_info = call_->client_rpc_info();
if (client_rpc_info != nullptr) {
- if (client_rpc_info->interceptors_.empty()) {
- return true;
- } else {
- return false;
- }
+ return client_rpc_info->interceptors_.empty();
}
auto* server_rpc_info = call_->server_rpc_info();
- if (server_rpc_info == nullptr || server_rpc_info->interceptors_.empty()) {
- return true;
- }
- return false;
+ return server_rpc_info == nullptr || server_rpc_info->interceptors_.empty();
}
// This should be used only by subclasses of CallOpSetInterface. SetCall and
@@ -419,11 +412,7 @@ class CancelInterceptorBatchMethods
public:
bool QueryInterceptionHookPoint(
experimental::InterceptionHookPoints type) override {
- if (type == experimental::InterceptionHookPoints::PRE_SEND_CANCEL) {
- return true;
- } else {
- return false;
- }
+ return type == experimental::InterceptionHookPoints::PRE_SEND_CANCEL;
}
void Proceed() override {