diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
commit | fc7be18c76af2e700641f3598c4856baeef1428e (patch) | |
tree | 11dbca45eb321c3a4dd08b12152acc6ef5dd3fa9 /contrib/libs/yaml-cpp/src/collectionstack.h | |
parent | ec0e7ed6da6fb317741fd8468602949a1362eca5 (diff) | |
parent | c92cb9d3a19331916f0c274d80e67f02a62caa9b (diff) | |
download | ydb-fc7be18c76af2e700641f3598c4856baeef1428e.tar.gz |
Merge branch 'rightlib' into mergelibs-240708-1553
Diffstat (limited to 'contrib/libs/yaml-cpp/src/collectionstack.h')
-rw-r--r-- | contrib/libs/yaml-cpp/src/collectionstack.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/libs/yaml-cpp/src/collectionstack.h b/contrib/libs/yaml-cpp/src/collectionstack.h index 46c463ebce..9feba96795 100644 --- a/contrib/libs/yaml-cpp/src/collectionstack.h +++ b/contrib/libs/yaml-cpp/src/collectionstack.h @@ -7,8 +7,8 @@ #pragma once #endif -#include <stack> #include <cassert> +#include <stack> namespace YAML { struct CollectionType { @@ -17,6 +17,7 @@ struct CollectionType { class CollectionStack { public: + CollectionStack() : collectionStack{} {} CollectionType::value GetCurCollectionType() const { if (collectionStack.empty()) return CollectionType::NoCollection; @@ -27,14 +28,14 @@ class CollectionStack { collectionStack.push(type); } void PopCollectionType(CollectionType::value type) { - (void)type; assert(type == GetCurCollectionType()); + (void)type; collectionStack.pop(); } private: std::stack<CollectionType::value> collectionStack; }; -} +} // namespace YAML #endif // COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 |