From 30ecd2b8d901ddfbaa1b607fa514e96e5f49cb11 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 20 May 2015 23:06:44 -0700 Subject: Return shared_ptr by value plus minor dependency fix --- test/cpp/util/benchmark_config.cc | 2 +- test/cpp/util/benchmark_config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/cpp/util') 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 InitBenchmarkReporters() { return std::shared_ptr(composite_reporter); } -const std::shared_ptr& GetReporter() { +std::shared_ptr GetReporter() { static std::shared_ptr 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& GetReporter(); +std::shared_ptr GetReporter(); } // namespace testing } // namespace grpc -- cgit v1.2.3