| 148 | |
| 149 | |
| 150 | void |
| 151 | Value::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 | // ////////////////////////////////////////////////////////////////// |
no test coverage detected