MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / setComment

Method setComment

Source/JSON/jsoncpp.cpp:2358–2369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2356}
2357
2358void Value::CommentInfo::setComment(const char* text, size_t len) {
2359 if (comment_) {
2360 releaseStringValue(comment_);
2361 comment_ = 0;
2362 }
2363 JSON_ASSERT(text != 0);
2364 JSON_ASSERT_MESSAGE(
2365 text[0] == '\0' || text[0] == '/',
2366 "in Json::Value::setComment(): Comments must start with /");
2367 // It seems that /**/ style comments are acceptable as well.
2368 comment_ = duplicateStringValue(text, len);
2369}
2370
2371// //////////////////////////////////////////////////////////////////
2372// //////////////////////////////////////////////////////////////////

Callers 4

parseMethod · 0.45
readValueMethod · 0.45
addCommentMethod · 0.45
ValueMethod · 0.45

Calls 4

releaseStringValueFunction · 0.70
duplicateStringValueFunction · 0.70
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected