diff options
author | David Garcia Quintas <dgq@google.com> | 2015-05-20 23:06:44 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-05-20 23:08:29 -0700 |
commit | 30ecd2b8d901ddfbaa1b607fa514e96e5f49cb11 (patch) | |
tree | 3515afd99ae5b09e57a3ddcc0cd5c96733ac4005 /test/cpp/util | |
parent | a6b559a76ae3d96f8df4abe07173c8b56fbfc032 (diff) |
Return shared_ptr by value plus minor dependency fix
Diffstat (limited to 'test/cpp/util')
-rw-r--r-- | test/cpp/util/benchmark_config.cc | 2 | ||||
-rw-r--r-- | test/cpp/util/benchmark_config.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/util/benchmark_config.cc b/test/cpp/util/benchmark_config.cc index 1b15ddcbcc..5b3c1daf5d 100644 --- a/test/cpp/util/benchmark_config.cc +++ b/test/cpp/util/benchmark_config.cc @@ -60,7 +60,7 @@ static std::shared_ptr<Reporter> InitBenchmarkReporters() { return std::shared_ptr<Reporter>(composite_reporter); } -const std::shared_ptr<Reporter>& GetReporter() { +std::shared_ptr<Reporter> GetReporter() { static std::shared_ptr<Reporter> reporter(InitBenchmarkReporters()); return reporter; } diff --git a/test/cpp/util/benchmark_config.h b/test/cpp/util/benchmark_config.h index 3a3a6d61ae..9e98dc3550 100644 --- a/test/cpp/util/benchmark_config.h +++ b/test/cpp/util/benchmark_config.h @@ -49,7 +49,7 @@ void InitBenchmark(int* argc, char*** argv, bool remove_flags); * The returned instane will take care of generating reports for all the actual * reporters configured via the "enable_*_reporter" command line flags (see * benchmark_config.cc). */ -const std::shared_ptr<Reporter>& GetReporter(); +std::shared_ptr<Reporter> GetReporter(); } // namespace testing } // namespace grpc |