Both Array and Dictionary are always in shared mode (removed copy on write).
This commit is contained in:
parent
57166cd292
commit
e6583117df
17 changed files with 50 additions and 93 deletions
|
|
@ -288,7 +288,7 @@ Error JSON::_parse_value(Variant &value,Token& token,const CharType *p_str,int &
|
|||
|
||||
if (token.type==TK_CURLY_BRACKET_OPEN) {
|
||||
|
||||
Dictionary d(true);
|
||||
Dictionary d;
|
||||
Error err = _parse_object(d,p_str,index,p_len,line,r_err_str);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
@ -296,7 +296,7 @@ Error JSON::_parse_value(Variant &value,Token& token,const CharType *p_str,int &
|
|||
return OK;
|
||||
} else if (token.type==TK_BRACKET_OPEN) {
|
||||
|
||||
Array a(true);
|
||||
Array a;
|
||||
Error err = _parse_array(a,p_str,index,p_len,line,r_err_str);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue