mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-02-25 07:41:07 +01:00
more changes per cr
This commit is contained in:
parent
05c1b8344d
commit
59167d8627
@ -1034,12 +1034,12 @@ bool Value::removeIndex(ArrayIndex index, Value* removed) {
|
||||
*removed = it->second;
|
||||
ArrayIndex oldSize = size();
|
||||
// shift left all items left, into the place of the "removed"
|
||||
for (ArrayIndex i=index; i<oldSize-1; i++){
|
||||
for (ArrayIndex i = index; i < (oldSize - 1); ++i){
|
||||
CZString key(i);
|
||||
(*value_.map_)[key] = (*this)[i+1];
|
||||
(*value_.map_)[key] = (*this)[i + 1];
|
||||
}
|
||||
// erase the last one ("leftover")
|
||||
CZString keyLast(oldSize-1);
|
||||
CZString keyLast(oldSize - 1);
|
||||
ObjectValues::iterator itLast = value_.map_->find(keyLast);
|
||||
value_.map_->erase(itLast);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user