MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / setComment

Method setComment

Sources/Dependencies/jsoncpp/value.cpp:1620–1630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1618 }
1619
1620 void Value::setComment(StringContainer comment, CommentPlacement placement) {
1621 if (!comment.empty() && (comment.back() == '\n')) {
1622 // Always discard trailing newline, to aid indentation.
1623 //comment.pop_back();
1624 }
1625 // TODO
1626 /*JSON_ASSERT_MESSAGE(
1627 comment.empty() || comment[0] == '/',
1628 "in Json::Value::setComment(): Comments must start with /");*/
1629 comments_.set(placement, std::move(comment));
1630 }
1631
1632 bool Value::hasComment() const {
1633 return comments_.hasAny();

Callers 3

parseMethod · 0.80
readValueMethod · 0.80
addCommentMethod · 0.80

Calls 3

emptyMethod · 0.45
backMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected