| 1640 | } |
| 1641 | |
| 1642 | void Value::CommentInfo::setComment(const char *text) { |
| 1643 | if (comment_) |
| 1644 | releaseStringValue(comment_); |
| 1645 | JSON_ASSERT(text != 0); |
| 1646 | JSON_ASSERT_MESSAGE( |
| 1647 | text[0] == '\0' || text[0] == '/', |
| 1648 | "in Json::Value::setComment(): Comments must start with /"); |
| 1649 | // It seems that /**/ style comments are acceptable as well. |
| 1650 | comment_ = duplicateStringValue(text); |
| 1651 | } |
| 1652 | |
| 1653 | // ////////////////////////////////////////////////////////////////// |
| 1654 | // ////////////////////////////////////////////////////////////////// |
no test coverage detected