| 1610 | } |
| 1611 | |
| 1612 | void Value::Comments::set(CommentPlacement slot, StringContainer comment) { |
| 1613 | if (slot >= CommentPlacement::numberOfCommentPlacement) |
| 1614 | return; |
| 1615 | if (!ptr_) |
| 1616 | ptr_ = std::unique_ptr<Array>(new Array()); |
| 1617 | (*ptr_)[slot] = std::move(comment); |
| 1618 | } |
| 1619 | |
| 1620 | void Value::setComment(StringContainer comment, CommentPlacement placement) { |
| 1621 | if (!comment.empty() && (comment.back() == '\n')) { |