Ejemplo n.º 1
0
MetaData::typed_data::typed_data(const typed_data &from)
    : mType(from.mType),
      mSize(0) {
    u.ext_data = NULL;
    allocateStorage(from.mSize);
    memcpy(storage(), from.storage(), mSize);
}
Ejemplo n.º 2
0
MetaData::typed_data::typed_data(const typed_data &from)
    : mType(from.mType),
      mSize(0) {

    void *dst = allocateStorage(from.mSize);
    if (dst) {
        memcpy(dst, from.storage(), mSize);
    }
}