/*-----------------------------------------------------------Attlist::replace-+ | Make a deep copy of an attribute, and replace it in the attribute list. | | Note: pAttSource *must* belong to the list! | +----------------------------------------------------------------------------*/ Attribute * Attlist::replace(Attribute const * pAttSource) { Attribute * pAtt = new Attribute(pAttSource->key(), pAttSource->dclv); if (pAtt) { if (!*pAtt) { delete pAtt; pAtt = 0; } else { if (!replaceAt(pAtt, ix(pAttSource))) pAtt = 0; } } return pAtt; }
ssize_t VectorImpl::replaceAt(size_t index) { return replaceAt(0, index); }