From 305ba313be0973e83efd70ccc365d284256f6c50 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 4 Sep 2018 13:46:40 -0700 Subject: [PATCH] Pass name by const-reference instead of by value in class Statistics' constructor (#668) --- include/benchmark/benchmark.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index adaeeeec..591b45c3 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -425,7 +425,7 @@ struct Statistics { std::string name_; StatisticsFunc* compute_; - Statistics(std::string name, StatisticsFunc* compute) + Statistics(const std::string& name, StatisticsFunc* compute) : name_(name), compute_(compute) {} };