mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-29 12:41:38 +08:00
drop unused CString ctor case
`Value::CZString::CZString(char const* str, unsigned length, DuplicationPolicy allocate)` with `allocate == duplicate` does not happen.
This commit is contained in:
parent
ee83f8891c
commit
a63d82d78a
@ -196,8 +196,9 @@ void Value::CommentInfo::setComment(const char* text, size_t len) {
|
|||||||
Value::CZString::CZString(ArrayIndex index) : cstr_(0), index_(index) {}
|
Value::CZString::CZString(ArrayIndex index) : cstr_(0), index_(index) {}
|
||||||
|
|
||||||
Value::CZString::CZString(char const* str, unsigned length, DuplicationPolicy allocate)
|
Value::CZString::CZString(char const* str, unsigned length, DuplicationPolicy allocate)
|
||||||
: cstr_(allocate == duplicate ? duplicateStringValue(str, length) : str)
|
: cstr_(str)
|
||||||
{
|
{
|
||||||
|
// allocate != duplicate
|
||||||
storage_.policy_ = allocate;
|
storage_.policy_ = allocate;
|
||||||
storage_.length_ = length;
|
storage_.length_ = length;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user