MCPcopy Create free account
hub / github.com/Illumina/paragraph / setComment

Method setComment

external/jsoncpp/jsoncpp.cpp:2702–2713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2700}
2701
2702void Value::CommentInfo::setComment(const char* text, size_t len) {
2703 if (comment_) {
2704 releaseStringValue(comment_, 0u);
2705 comment_ = 0;
2706 }
2707 JSON_ASSERT(text != 0);
2708 JSON_ASSERT_MESSAGE(
2709 text[0] == '\0' || text[0] == '/',
2710 "in Json::Value::setComment(): Comments must start with /");
2711 // It seems that /**/ style comments are acceptable as well.
2712 comment_ = duplicateStringValue(text, len);
2713}
2714
2715// //////////////////////////////////////////////////////////////////
2716// //////////////////////////////////////////////////////////////////

Callers 4

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

Calls 3

releaseStringValueFunction · 0.85
duplicateStringValueFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected