Various fixes and improvements, backported from Pro version. Code by Erik Zandvliet.
This commit is contained in:
parent
5cce37c521
commit
b28a619fc6
13 changed files with 383 additions and 550 deletions
|
@ -657,12 +657,13 @@ JSON::Value & JSON::Value::operator[](const char * i) {
|
|||
/// Retrieves or sets the JSON::Value at this position in the array.
|
||||
/// Converts destructively to array if not already an array.
|
||||
JSON::Value & JSON::Value::operator[](unsigned int i) {
|
||||
static JSON::Value empty;
|
||||
if (myType != ARRAY) {
|
||||
null();
|
||||
myType = ARRAY;
|
||||
}
|
||||
while (i >= arrVal.size()) {
|
||||
append(new JSON::Value());
|
||||
append(empty);
|
||||
}
|
||||
return *arrVal[i];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue