Skip to content

Commit

Permalink
more changes per cr
Browse files Browse the repository at this point in the history
  • Loading branch information
cdunn2001 committed Jan 21, 2015
1 parent 05c1b83 commit 59167d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib_json/json_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 59167d8

Please sign in to comment.