mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-13 10:22:55 +01:00
parent
90591c70cd
commit
d830c0ab94
@ -582,7 +582,7 @@ void StyledWriter::writeCommentBeforeValue(const Value& root) {
|
|||||||
while (iter != comment.end()) {
|
while (iter != comment.end()) {
|
||||||
document_ += *iter;
|
document_ += *iter;
|
||||||
if (*iter == '\n' &&
|
if (*iter == '\n' &&
|
||||||
(iter != comment.end() && *(iter + 1) == '/'))
|
((iter+1) != comment.end() && *(iter + 1) == '/'))
|
||||||
writeIndent();
|
writeIndent();
|
||||||
++iter;
|
++iter;
|
||||||
}
|
}
|
||||||
@ -798,7 +798,7 @@ void StyledStreamWriter::writeCommentBeforeValue(const Value& root) {
|
|||||||
while (iter != comment.end()) {
|
while (iter != comment.end()) {
|
||||||
*document_ << *iter;
|
*document_ << *iter;
|
||||||
if (*iter == '\n' &&
|
if (*iter == '\n' &&
|
||||||
(iter != comment.end() && *(iter + 1) == '/'))
|
((iter+1) != comment.end() && *(iter + 1) == '/'))
|
||||||
// writeIndent(); // would include newline
|
// writeIndent(); // would include newline
|
||||||
*document_ << indentString_;
|
*document_ << indentString_;
|
||||||
++iter;
|
++iter;
|
||||||
@ -1086,7 +1086,7 @@ void BuiltStyledStreamWriter::writeCommentBeforeValue(Value const& root) {
|
|||||||
while (iter != comment.end()) {
|
while (iter != comment.end()) {
|
||||||
*sout_ << *iter;
|
*sout_ << *iter;
|
||||||
if (*iter == '\n' &&
|
if (*iter == '\n' &&
|
||||||
(iter != comment.end() && *(iter + 1) == '/'))
|
((iter+1) != comment.end() && *(iter + 1) == '/'))
|
||||||
// writeIndent(); // would write extra newline
|
// writeIndent(); // would write extra newline
|
||||||
*sout_ << indentString_;
|
*sout_ << indentString_;
|
||||||
++iter;
|
++iter;
|
||||||
|
Loading…
Reference in New Issue
Block a user