MCPcopy Create free account
hub / github.com/Illumina/hap.py / setComment

Method setComment

external/jsoncpp/jsoncpp.cpp:1642–1651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1640}
1641
1642void 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// //////////////////////////////////////////////////////////////////

Callers 4

parseMethod · 0.80
readValueMethod · 0.80
addCommentMethod · 0.80
ValueMethod · 0.80

Calls 3

releaseStringValueFunction · 0.85
duplicateStringValueFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected