blob: 5ce4aed694bd37f41a6c194fdb6eb156e14fd604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright 2018 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/fxcrt/xml/cfx_xmldocument.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/xml/cfx_xmlinstruction.h"
#include "third_party/base/ptr_util.h"
CFX_XMLDocument::CFX_XMLDocument() {
root_ = CreateNode<CFX_XMLElement>(L"root");
}
CFX_XMLDocument::~CFX_XMLDocument() = default;
void CFX_XMLDocument::AppendNodesFrom(CFX_XMLDocument* other) {
nodes_.reserve(nodes_.size() + other->nodes_.size());
nodes_.insert(nodes_.end(), std::make_move_iterator(other->nodes_.begin()),
std::make_move_iterator(other->nodes_.end()));
other->nodes_.clear();
}
|