MCPcopy Create free account
hub / github.com/SOUI2/soui / setComment

Method setComment

third-part/jsoncpp/src/lib_json/json_value.cpp:233–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233void Value::CommentInfo::setComment(const char* text, size_t len) {
234 if (comment_) {
235 releaseStringValue(comment_, 0u);
236 comment_ = 0;
237 }
238 JSON_ASSERT(text != 0);
239 JSON_ASSERT_MESSAGE(
240 text[0] == '\0' || text[0] == '/',
241 "in Json::Value::setComment(): Comments must start with /");
242 // It seems that /**/ style comments are acceptable as well.
243 comment_ = duplicateStringValue(text, len);
244}
245
246// //////////////////////////////////////////////////////////////////
247// //////////////////////////////////////////////////////////////////

Callers 5

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

Calls 4

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

Tested by

no test coverage detected