diff options
author | 2018-06-07 22:52:23 -0700 | |
---|---|---|
committer | 2018-06-14 14:58:09 -0400 | |
commit | 373fc6dc40a7d12bb257d67188ca3aa3c997d8a6 (patch) | |
tree | a0bf04f2f5ee080b1adeb6d9dc59a91157ae0d45 /test/cpp/interop/http2_client.cc | |
parent | 58e0cbf9fb67186ee67be5bb71aba36e9cfebe7f (diff) |
Manual fixes to enable performance- clang tidy checks
Diffstat (limited to 'test/cpp/interop/http2_client.cc')
-rw-r--r-- | test/cpp/interop/http2_client.cc | 11 |
1 files changed, 6 insertions, 5 deletions
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_(channel) { +Http2Client::ServiceStub::ServiceStub(const std::shared_ptr<Channel>& channel) + : channel_(std::move(channel)) { stub_ = TestService::NewStub(channel); } TestService::Stub* Http2Client::ServiceStub::Get() { return stub_.get(); } -Http2Client::Http2Client(std::shared_ptr<Channel> channel) +Http2Client::Http2Client(const std::shared_ptr<Channel>& 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<grpc::Channel> channel) { +void Http2Client::MaxStreamsWorker( + const std::shared_ptr<grpc::Channel>& channel) { SimpleResponse response; AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == |