From 373fc6dc40a7d12bb257d67188ca3aa3c997d8a6 Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Thu, 7 Jun 2018 22:52:23 -0700 Subject: Manual fixes to enable performance- clang tidy checks --- test/cpp/interop/http2_client.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test/cpp/interop/http2_client.cc') diff --git a/test/cpp/interop/http2_client.cc b/test/cpp/interop/http2_client.cc index 543f159265..bc7f0f5edb 100644 --- a/test/cpp/interop/http2_client.cc +++ b/test/cpp/interop/http2_client.cc @@ -42,16 +42,16 @@ const int kLargeRequestSize = 271828; const int kLargeResponseSize = 314159; } // namespace -Http2Client::ServiceStub::ServiceStub(std::shared_ptr channel) - : channel_(channel) { +Http2Client::ServiceStub::ServiceStub(const std::shared_ptr& channel) + : channel_(std::move(channel)) { stub_ = TestService::NewStub(channel); } TestService::Stub* Http2Client::ServiceStub::Get() { return stub_.get(); } -Http2Client::Http2Client(std::shared_ptr channel) +Http2Client::Http2Client(const std::shared_ptr& channel) : serviceStub_(channel), - channel_(channel), + channel_(std::move(channel)), defaultRequest_(BuildDefaultRequest()) {} bool Http2Client::AssertStatusCode(const Status& s, StatusCode expected_code) { @@ -140,7 +140,8 @@ bool Http2Client::DoPing() { return true; } -void Http2Client::MaxStreamsWorker(std::shared_ptr channel) { +void Http2Client::MaxStreamsWorker( + const std::shared_ptr& channel) { SimpleResponse response; AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == -- cgit v1.2.3