diff --git a/test/cpp/interop/xds_interop_client.cc b/test/cpp/interop/xds_interop_client.cc index a229eb5588a..3b80ea4eab3 100644 --- a/test/cpp/interop/xds_interop_client.cc +++ b/test/cpp/interop/xds_interop_client.cc @@ -117,7 +117,7 @@ class XdsStatsWatcher { class TestClient { public: - TestClient(std::shared_ptr channel) + TestClient(const std::shared_ptr& channel) : stub_(TestService::NewStub(channel)) {} void UnaryCall() { diff --git a/test/cpp/interop/xds_interop_server.cc b/test/cpp/interop/xds_interop_server.cc index 0c7e594817b..59f2328cba8 100644 --- a/test/cpp/interop/xds_interop_server.cc +++ b/test/cpp/interop/xds_interop_server.cc @@ -52,7 +52,7 @@ using grpc::testing::TestService; class TestServiceImpl : public TestService::Service { public: - TestServiceImpl(std::string i) : hostname_(i) {} + TestServiceImpl(const std::string& i) : hostname_(i) {} Status UnaryCall(ServerContext* context, const SimpleRequest* request, SimpleResponse* response) { @@ -65,7 +65,7 @@ class TestServiceImpl : public TestService::Service { std::string hostname_; }; -void RunServer(const int port, std::string hostname) { +void RunServer(const int port, const std::string& hostname) { std::ostringstream server_address; server_address << "0.0.0.0:" << port;