MCPcopy Create free account
hub / github.com/ValveSoftware/Proton / setComment

Method setComment

vrclient_x64/jsoncpp.cpp:2631–2642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2629}
2630
2631void Value::CommentInfo::setComment(const char* text, size_t len) {
2632 if (comment_) {
2633 releaseStringValue(comment_);
2634 comment_ = 0;
2635 }
2636 JSON_ASSERT(text != 0);
2637 JSON_ASSERT_MESSAGE(
2638 text[0] == '\0' || text[0] == '/',
2639 "in Json::Value::setComment(): Comments must start with /");
2640 // It seems that /**/ style comments are acceptable as well.
2641 comment_ = duplicateStringValue(text, len);
2642}
2643
2644// //////////////////////////////////////////////////////////////////
2645// //////////////////////////////////////////////////////////////////

Callers 4

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

Calls 4

releaseStringValueFunction · 0.85
duplicateStringValueFunction · 0.85
lengthMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected