Exemplo n.º 1
0
std::unique_ptr<ContentData> ContentData::clone() const
{
    auto result = cloneInternal();
    
    ContentData* lastNewData = result.get();
    for (const ContentData* contentData = next(); contentData; contentData = contentData->next()) {
        auto newData = contentData->cloneInternal();
        lastNewData->setNext(std::move(newData));
        lastNewData = lastNewData->next();
    }
        
    return result;
}
Exemplo n.º 2
0
PassOwnPtr<ContentData> ContentData::clone() const
{
    OwnPtr<ContentData> result = cloneInternal();

    ContentData* lastNewData = result.get();
    for (const ContentData* contentData = next(); contentData; contentData = contentData->next()) {
        OwnPtr<ContentData> newData = contentData->cloneInternal();
        lastNewData->setNext(newData.release());
        lastNewData = lastNewData->next();
    }

    return result.release();
}
Exemplo n.º 3
0
ContentData* ContentData::clone() const {
  ContentData* result = cloneInternal();

  ContentData* lastNewData = result;
  for (const ContentData* contentData = next(); contentData;
       contentData = contentData->next()) {
    ContentData* newData = contentData->cloneInternal();
    lastNewData->setNext(newData);
    lastNewData = lastNewData->next();
  }

  return result;
}