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

Method setComment

src/jsoncpp.cpp:2632–2643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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