Skip to content

Commit a63d82d

Browse files
committed
drop unused CString ctor case
`Value::CZString::CZString(char const* str, unsigned length, DuplicationPolicy allocate)` with `allocate == duplicate` does not happen.
1 parent ee83f88 commit a63d82d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib_json/json_value.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ void Value::CommentInfo::setComment(const char* text, size_t len) {
196196
Value::CZString::CZString(ArrayIndex index) : cstr_(0), index_(index) {}
197197

198198
Value::CZString::CZString(char const* str, unsigned length, DuplicationPolicy allocate)
199-
: cstr_(allocate == duplicate ? duplicateStringValue(str, length) : str)
199+
: cstr_(str)
200200
{
201+
// allocate != duplicate
201202
storage_.policy_ = allocate;
202203
storage_.length_ = length;
203204
}

0 commit comments

Comments
 (0)