| 1630 | } |
| 1631 | |
| 1632 | void Value::CommentInfo::setComment(const char* text) { |
| 1633 | if (comment_) |
| 1634 | releaseStringValue(comment_); |
| 1635 | JSON_ASSERT(text != 0); |
| 1636 | JSON_ASSERT_MESSAGE( |
| 1637 | text[0] == '\0' || text[0] == '/', |
| 1638 | "in Json::Value::setComment(): Comments must start with /"); |
| 1639 | // It seems that /**/ style comments are acceptable as well. |
| 1640 | comment_ = duplicateStringValue(text); |
| 1641 | } |
| 1642 | |
| 1643 | // ////////////////////////////////////////////////////////////////// |
| 1644 | // ////////////////////////////////////////////////////////////////// |
no test coverage detected