prefer std::string for setComment()

in case of embedded nulls
This commit is contained in:
Christopher Dunn
2015-03-08 13:35:57 -05:00
parent 24682e37bf
commit 50069d72da
2 changed files with 2 additions and 1 deletions

View File

@@ -1542,7 +1542,7 @@ JSONTEST_FIXTURE(ValueTest, StaticString) {
JSONTEST_FIXTURE(ValueTest, CommentBefore) {
Json::Value val; // fill val
val.setComment("// this comment should appear before", Json::commentBefore);
val.setComment(std::string("// this comment should appear before"), Json::commentBefore);
Json::StreamWriterBuilder wbuilder;
wbuilder.settings_["commentStyle"] = "All";
{