mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 18:10:27 +01:00
"\n" -> '\n'
This commit is contained in:
parent
c00a3b95c2
commit
745287275c
@ -1491,7 +1491,7 @@ JSONCPP_STRING Value::toStyledString() const {
|
||||
|
||||
JSONCPP_STRING out = this->hasComment(commentBefore) ? "\n" : "";
|
||||
out += Json::writeString(builder, *this);
|
||||
out += "\n";
|
||||
out += '\n';
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ JSONCPP_STRING FastWriter::write(const Value& root) {
|
||||
document_.clear();
|
||||
writeValue(root);
|
||||
if (!omitEndingLineFeed_)
|
||||
document_ += "\n";
|
||||
document_ += '\n';
|
||||
return document_;
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ JSONCPP_STRING StyledWriter::write(const Value& root) {
|
||||
writeCommentBeforeValue(root);
|
||||
writeValue(root);
|
||||
writeCommentAfterValueOnSameLine(root);
|
||||
document_ += "\n";
|
||||
document_ += '\n';
|
||||
return document_;
|
||||
}
|
||||
|
||||
@ -608,7 +608,7 @@ void StyledWriter::writeCommentBeforeValue(const Value& root) {
|
||||
if (!root.hasComment(commentBefore))
|
||||
return;
|
||||
|
||||
document_ += "\n";
|
||||
document_ += '\n';
|
||||
writeIndent();
|
||||
const JSONCPP_STRING& comment = root.getComment(commentBefore);
|
||||
JSONCPP_STRING::const_iterator iter = comment.begin();
|
||||
@ -620,7 +620,7 @@ void StyledWriter::writeCommentBeforeValue(const Value& root) {
|
||||
}
|
||||
|
||||
// Comments are stripped of trailing newlines, so add one here
|
||||
document_ += "\n";
|
||||
document_ += '\n';
|
||||
}
|
||||
|
||||
void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) {
|
||||
@ -628,9 +628,9 @@ void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) {
|
||||
document_ += " " + root.getComment(commentAfterOnSameLine);
|
||||
|
||||
if (root.hasComment(commentAfter)) {
|
||||
document_ += "\n";
|
||||
document_ += '\n';
|
||||
document_ += root.getComment(commentAfter);
|
||||
document_ += "\n";
|
||||
document_ += '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user