MCPcopy Create free account
hub / github.com/cuberite/cuberite / setComment

Method setComment

lib/jsoncpp/src/lib_json/json_value.cpp:150–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149
150void
151Value::CommentInfo::setComment( const char *text )
152{
153 if ( comment_ )
154 valueAllocator()->releaseStringValue( comment_ );
155 JSON_ASSERT( text );
156 //JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
157 JSON_ASSERT( text[0]=='\0' || text[0]=='/' );
158 // It seems that /**/ style comments are acceptable as well.
159 comment_ = valueAllocator()->duplicateStringValue( text );
160}
161
162
163// //////////////////////////////////////////////////////////////////

Callers 4

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

Calls 3

releaseStringValueMethod · 0.80
duplicateStringValueMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected