Pass string as a const reference.

This commit is contained in:
Marian Klymov 2018-06-02 19:41:57 +03:00
parent 85a263e89f
commit c8bb600d27
2 changed files with 2 additions and 2 deletions

View File

@ -300,7 +300,7 @@ public:
/**
* \param indentation Each level will be indented by this amount extra.
*/
StyledStreamWriter(JSONCPP_STRING indentation = "\t");
StyledStreamWriter(const JSONCPP_STRING& indentation = "\t");
~StyledStreamWriter() {}
public:

View File

@ -643,7 +643,7 @@ bool StyledWriter::hasCommentForValue(const Value& value) {
// Class StyledStreamWriter
// //////////////////////////////////////////////////////////////////
StyledStreamWriter::StyledStreamWriter(JSONCPP_STRING indentation)
StyledStreamWriter::StyledStreamWriter(const JSONCPP_STRING& indentation)
: document_(NULL), rightMargin_(74), indentation_(indentation),
addChildValues_(), indented_(false) {}