Avoiding copy by passing param by reference

It is best to pass bad_value_ param by reference to avoid copy.
pull/19717/head
Dan Ben Yosef 4 years ago
parent f136adcad5
commit d4d805cb3e
  1. 2
      modules/core/src/system.cpp

@ -1938,7 +1938,7 @@ class ParseError
{ {
std::string bad_value; std::string bad_value;
public: 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::string toString(const std::string &param) const
{ {
std::ostringstream out; std::ostringstream out;

Loading…
Cancel
Save