Commit 305ba313 by Changming Sun Committed by Roman Lebedev

Pass name by const-reference instead of by value in class Statistics' constructor (#668)

parent fbfc495d
...@@ -425,7 +425,7 @@ struct Statistics { ...@@ -425,7 +425,7 @@ struct Statistics {
std::string name_; std::string name_;
StatisticsFunc* compute_; StatisticsFunc* compute_;
Statistics(std::string name, StatisticsFunc* compute) Statistics(const std::string& name, StatisticsFunc* compute)
: name_(name), compute_(compute) {} : name_(name), compute_(compute) {}
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment