Skip to content

Commit

Permalink
Pass string as a const reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekto89 committed Jun 2, 2018
1 parent 85a263e commit c8bb600
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/json/writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API
/**
* \param indentation Each level will be indented by this amount extra.
*/
StyledStreamWriter(JSONCPP_STRING indentation = "\t");
StyledStreamWriter(const JSONCPP_STRING& indentation = "\t");
~StyledStreamWriter() {}

public:
Expand Down
2 changes: 1 addition & 1 deletion src/lib_json/json_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand Down

0 comments on commit c8bb600

Please sign in to comment.