Ejemplo n.º 1
0
Archivo: attrib.cpp Proyecto: Jaxo/yaxx
/*-----------------------------------------------------------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;
}
Ejemplo n.º 2
0
ssize_t VectorImpl::replaceAt(size_t index)
{
    return replaceAt(0, index);
}