aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end/test_service_impl.cc
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2016-11-03 12:45:02 -0700
committerGravatar Vijay Pai <vpai@google.com>2016-11-04 07:51:25 -0700
commitb0a6be2b8f7791b62bb4c998845bee1ed1a23f23 (patch)
treeff29a71183a436cd940c92603008d152a47ef7e7 /test/cpp/end2end/test_service_impl.cc
parentf4671bfaef0db6456a98f49d12dab5b845ea5ed4 (diff)
Remove some unnecessary new/delete patterns
Diffstat (limited to 'test/cpp/end2end/test_service_impl.cc')
-rw-r--r--test/cpp/end2end/test_service_impl.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc
index 2de344efd5..001047778d 100644
--- a/test/cpp/end2end/test_service_impl.cc
+++ b/test/cpp/end2end/test_service_impl.cc
@@ -194,7 +194,7 @@ Status TestServiceImpl::RequestStream(ServerContext* context,
return Status::CANCELLED;
}
- std::thread* server_try_cancel_thd = NULL;
+ std::thread* server_try_cancel_thd = nullptr;
if (server_try_cancel == CANCEL_DURING_PROCESSING) {
server_try_cancel_thd =
new std::thread(&TestServiceImpl::ServerTryCancel, this, context);
@@ -212,7 +212,7 @@ Status TestServiceImpl::RequestStream(ServerContext* context,
}
gpr_log(GPR_INFO, "Read: %d messages", num_msgs_read);
- if (server_try_cancel_thd != NULL) {
+ if (server_try_cancel_thd != nullptr) {
server_try_cancel_thd->join();
delete server_try_cancel_thd;
return Status::CANCELLED;
@@ -248,7 +248,7 @@ Status TestServiceImpl::ResponseStream(ServerContext* context,
}
EchoResponse response;
- std::thread* server_try_cancel_thd = NULL;
+ std::thread* server_try_cancel_thd = nullptr;
if (server_try_cancel == CANCEL_DURING_PROCESSING) {
server_try_cancel_thd =
new std::thread(&TestServiceImpl::ServerTryCancel, this, context);
@@ -259,7 +259,7 @@ Status TestServiceImpl::ResponseStream(ServerContext* context,
writer->Write(response);
}
- if (server_try_cancel_thd != NULL) {
+ if (server_try_cancel_thd != nullptr) {
server_try_cancel_thd->join();
delete server_try_cancel_thd;
return Status::CANCELLED;
@@ -295,7 +295,7 @@ Status TestServiceImpl::BidiStream(
return Status::CANCELLED;
}
- std::thread* server_try_cancel_thd = NULL;
+ std::thread* server_try_cancel_thd = nullptr;
if (server_try_cancel == CANCEL_DURING_PROCESSING) {
server_try_cancel_thd =
new std::thread(&TestServiceImpl::ServerTryCancel, this, context);
@@ -307,7 +307,7 @@ Status TestServiceImpl::BidiStream(
stream->Write(response);
}
- if (server_try_cancel_thd != NULL) {
+ if (server_try_cancel_thd != nullptr) {
server_try_cancel_thd->join();
delete server_try_cancel_thd;
return Status::CANCELLED;