Avoiding copy by passing param by reference

It is best to pass bad_value_ param by reference to avoid copy.
This commit is contained in:
Dan Ben Yosef
2021-03-12 14:17:11 -05:00
parent f136adcad5
commit d4d805cb3e
+1 -1
View File
@@ -1938,7 +1938,7 @@ class ParseError
{
std::string bad_value;
public:
ParseError(const std::string bad_value_) :bad_value(bad_value_) {}
ParseError(const std::string &bad_value_) :bad_value(bad_value_) {}
std::string toString(const std::string &param) const
{
std::ostringstream out;