mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-09-24 04:32:32 -04:00
Update json_value.cpp
This commit is contained in:
parent
0707eefd55
commit
3345a5cf86
@ -1401,7 +1401,7 @@ void Value::Comments::set(CommentPlacement slot, String comment) {
|
|||||||
if (!ptr_) {
|
if (!ptr_) {
|
||||||
ptr_ = std::unique_ptr<Array>(new Array());
|
ptr_ = std::unique_ptr<Array>(new Array());
|
||||||
}
|
}
|
||||||
// check comments array boundary.
|
|
||||||
if (slot < CommentPlacement::numberOfCommentPlacement) {
|
if (slot < CommentPlacement::numberOfCommentPlacement) {
|
||||||
(*ptr_)[slot] = std::move(comment);
|
(*ptr_)[slot] = std::move(comment);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user