You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void Value::remove(ArrayIndex index)
{
if (type_ == arrayValue){
#ifndef JSON_VALUE_USE_INTERNAL_MAP
CZString key(index);
ObjectValues::iterator it = value_.map_->find(key);
if (it != value_.map_->end()){
ArrayIndex oldSize = size();
// shift left all items left, into the place of the "removed"
for (ArrayIndex i=index; i<oldSize-1; i++){
CZString key(i);
(*value_.map_)[key] = (*this)[i+1];
}
// erase the last one ("leftover")
CZString keyLast(oldSize-1);
ObjectValues::iterator itLast = value_.map_->find(keyLast);
value_.map_->erase(itLast);
}
#else
NOT SUPPORTED
#endif
}
}
The text was updated successfully, but these errors were encountered:
From Itzik S (privately):
The text was updated successfully, but these errors were encountered: