diff options
author | antonyzhilin <antonyzhilin@yandex-team.com> | 2024-07-05 19:56:10 +0300 |
---|---|---|
committer | antonyzhilin <antonyzhilin@yandex-team.com> | 2024-07-05 20:06:51 +0300 |
commit | 92272084057d874f12ce24f5a7950b867f7d50c2 (patch) | |
tree | 80fd973f61edfd5c1961c6dd024096b5f2822a5e /contrib/libs/yaml-cpp/src/nodebuilder.cpp | |
parent | ada19b071f15ecd5d6784db9fd710f68bcccf310 (diff) | |
download | ydb-92272084057d874f12ce24f5a7950b867f7d50c2.tar.gz |
feat contrib: update yaml-cpp to 0.8.0
6e6348bacf1f4cc2d24d90954c63619ba9bee1f0
Diffstat (limited to 'contrib/libs/yaml-cpp/src/nodebuilder.cpp')
-rw-r--r-- | contrib/libs/yaml-cpp/src/nodebuilder.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/libs/yaml-cpp/src/nodebuilder.cpp b/contrib/libs/yaml-cpp/src/nodebuilder.cpp index 093d2efeb7..bbaefac8a6 100644 --- a/contrib/libs/yaml-cpp/src/nodebuilder.cpp +++ b/contrib/libs/yaml-cpp/src/nodebuilder.cpp @@ -1,4 +1,3 @@ -#include <assert.h> #include <cassert> #include "nodebuilder.h" @@ -11,11 +10,16 @@ namespace YAML { struct Mark; NodeBuilder::NodeBuilder() - : m_pMemory(new detail::memory_holder), m_pRoot(0), m_mapDepth(0) { - m_anchors.push_back(0); // since the anchors start at 1 + : m_pMemory(new detail::memory_holder), + m_pRoot(nullptr), + m_stack{}, + m_anchors{}, + m_keys{}, + m_mapDepth(0) { + m_anchors.push_back(nullptr); // since the anchors start at 1 } -NodeBuilder::~NodeBuilder() {} +NodeBuilder::~NodeBuilder() = default; Node NodeBuilder::Root() { if (!m_pRoot) @@ -88,7 +92,7 @@ void NodeBuilder::Push(detail::node& node) { m_stack.push_back(&node); if (needsKey) - m_keys.push_back(PushedKey(&node, false)); + m_keys.emplace_back(&node, false); } void NodeBuilder::Pop() { @@ -127,4 +131,4 @@ void NodeBuilder::RegisterAnchor(anchor_t anchor, detail::node& node) { m_anchors.push_back(&node); } } -} +} // namespace YAML |