MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / setComment

Method setComment

edrav2/eprj/jsoncpp/src/lib_json/json_value.cpp:243–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void Value::CommentInfo::setComment(const char* text, size_t len) {
244 if (comment_) {
245 releaseStringValue(comment_, 0u);
246 comment_ = nullptr;
247 }
248 JSON_ASSERT(text != nullptr);
249 JSON_ASSERT_MESSAGE(
250 text[0] == '\0' || text[0] == '/',
251 "in Json::Value::setComment(): Comments must start with /");
252 // It seems that /**/ style comments are acceptable as well.
253 comment_ = duplicateStringValue(text, len);
254}
255
256// //////////////////////////////////////////////////////////////////
257// //////////////////////////////////////////////////////////////////

Callers 5

parseMethod · 0.80
readValueMethod · 0.80
addCommentMethod · 0.80
dupMetaMethod · 0.80
JSONTEST_FIXTUREFunction · 0.80

Calls 5

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

Tested by

no test coverage detected