mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-28 03:50:53 +08:00
Merge pull request #543 from chfast/patch-1
Rename variable empty to emptyString
This commit is contained in:
commit
a1db52b030
@ -343,7 +343,7 @@ bool Value::CZString::isStaticString() const { return storage_.policy_ == noDupl
|
|||||||
* This optimization is used in ValueInternalMap fast allocator.
|
* This optimization is used in ValueInternalMap fast allocator.
|
||||||
*/
|
*/
|
||||||
Value::Value(ValueType vtype) {
|
Value::Value(ValueType vtype) {
|
||||||
static char const empty[] = "";
|
static char const emptyString[] = "";
|
||||||
initBasic(vtype);
|
initBasic(vtype);
|
||||||
switch (vtype) {
|
switch (vtype) {
|
||||||
case nullValue:
|
case nullValue:
|
||||||
@ -357,7 +357,7 @@ Value::Value(ValueType vtype) {
|
|||||||
break;
|
break;
|
||||||
case stringValue:
|
case stringValue:
|
||||||
// allocated_ == false, so this is safe.
|
// allocated_ == false, so this is safe.
|
||||||
value_.string_ = const_cast<char*>(static_cast<char const*>(empty));
|
value_.string_ = const_cast<char*>(static_cast<char const*>(emptyString));
|
||||||
break;
|
break;
|
||||||
case arrayValue:
|
case arrayValue:
|
||||||
case objectValue:
|
case objectValue:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user