diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-11-15 16:49:43 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-11-15 16:49:43 -0800 |
commit | 626f1c9d537de45c6604a1dc7b103933073c4f00 (patch) | |
tree | 396f1e34d6ec9816987cf74532f945667b6f90a2 /test/cpp/end2end/interceptors_util.cc | |
parent | 9cfacc48ee2e9f8db083d578c84881551734b1f0 (diff) |
Remove the std::unique_ptr, instead use move semantics everywhere
Diffstat (limited to 'test/cpp/end2end/interceptors_util.cc')
-rw-r--r-- | test/cpp/end2end/interceptors_util.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/cpp/end2end/interceptors_util.cc b/test/cpp/end2end/interceptors_util.cc index 602d1695a3..5d59c1a4b7 100644 --- a/test/cpp/end2end/interceptors_util.cc +++ b/test/cpp/end2end/interceptors_util.cc @@ -132,16 +132,13 @@ bool CheckMetadata(const std::multimap<grpc::string_ref, grpc::string_ref>& map, return false; } -std::unique_ptr<std::vector< - std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>> +std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>> CreateDummyClientInterceptors() { - auto creators = std::unique_ptr<std::vector< - std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>( - new std::vector< - std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>()); + std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>> + creators; // Add 20 dummy interceptors before hijacking interceptor for (auto i = 0; i < 20; i++) { - creators->push_back(std::unique_ptr<DummyInterceptorFactory>( + creators.push_back(std::unique_ptr<DummyInterceptorFactory>( new DummyInterceptorFactory())); } return creators; |