"\n" -> '\n'

This commit is contained in:
pavel.pimenov 2018-06-04 09:06:24 +03:00 committed by Christopher Dunn
parent c00a3b95c2
commit 745287275c
2 changed files with 7 additions and 7 deletions

View File

@ -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;
}

View File

@ -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';
}
}