more changes per cr

This commit is contained in:
Christopher Dunn 2015-01-21 16:04:46 -06:00
parent 05c1b8344d
commit 59167d8627

View File

@ -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;