aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yaml-cpp/src/parse.cpp
diff options
context:
space:
mode:
authorbnagaev <bnagaev@yandex-team.ru>2022-02-10 16:47:04 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:04 +0300
commitc74559fb88da8adac0d9186cfa55a6b13c47695f (patch)
treeb83306b6e37edeea782e9eed673d89286c4fef35 /contrib/libs/yaml-cpp/src/parse.cpp
parentd6449ba66291ff0c0d352c82e6eb3efb4c8a7e8d (diff)
downloadydb-c74559fb88da8adac0d9186cfa55a6b13c47695f.tar.gz
Restoring authorship annotation for <bnagaev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/yaml-cpp/src/parse.cpp')
-rw-r--r--contrib/libs/yaml-cpp/src/parse.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/contrib/libs/yaml-cpp/src/parse.cpp b/contrib/libs/yaml-cpp/src/parse.cpp
index 6499f85df07..0b2ae4a4f6e 100644
--- a/contrib/libs/yaml-cpp/src/parse.cpp
+++ b/contrib/libs/yaml-cpp/src/parse.cpp
@@ -1,72 +1,72 @@
-#include "yaml-cpp/node/parse.h"
-
-#include <fstream>
-#include <sstream>
-
-#include "yaml-cpp/node/node.h"
-#include "yaml-cpp/node/impl.h"
-#include "yaml-cpp/parser.h"
-#include "nodebuilder.h"
-
-namespace YAML {
-Node Load(const std::string& input) {
- std::stringstream stream(input);
- return Load(stream);
-}
-
-Node Load(const char* input) {
- std::stringstream stream(input);
- return Load(stream);
-}
-
-Node Load(std::istream& input) {
- Parser parser(input);
- NodeBuilder builder;
+#include "yaml-cpp/node/parse.h"
+
+#include <fstream>
+#include <sstream>
+
+#include "yaml-cpp/node/node.h"
+#include "yaml-cpp/node/impl.h"
+#include "yaml-cpp/parser.h"
+#include "nodebuilder.h"
+
+namespace YAML {
+Node Load(const std::string& input) {
+ std::stringstream stream(input);
+ return Load(stream);
+}
+
+Node Load(const char* input) {
+ std::stringstream stream(input);
+ return Load(stream);
+}
+
+Node Load(std::istream& input) {
+ Parser parser(input);
+ NodeBuilder builder;
if (!parser.HandleNextDocument(builder)) {
- return Node();
+ return Node();
}
-
- return builder.Root();
-}
-
-Node LoadFile(const std::string& filename) {
- std::ifstream fin(filename.c_str());
+
+ return builder.Root();
+}
+
+Node LoadFile(const std::string& filename) {
+ std::ifstream fin(filename.c_str());
if (!fin) {
- throw BadFile();
+ throw BadFile();
}
- return Load(fin);
-}
-
-std::vector<Node> LoadAll(const std::string& input) {
- std::stringstream stream(input);
- return LoadAll(stream);
-}
-
-std::vector<Node> LoadAll(const char* input) {
- std::stringstream stream(input);
- return LoadAll(stream);
-}
-
-std::vector<Node> LoadAll(std::istream& input) {
- std::vector<Node> docs;
-
- Parser parser(input);
- while (1) {
- NodeBuilder builder;
+ return Load(fin);
+}
+
+std::vector<Node> LoadAll(const std::string& input) {
+ std::stringstream stream(input);
+ return LoadAll(stream);
+}
+
+std::vector<Node> LoadAll(const char* input) {
+ std::stringstream stream(input);
+ return LoadAll(stream);
+}
+
+std::vector<Node> LoadAll(std::istream& input) {
+ std::vector<Node> docs;
+
+ Parser parser(input);
+ while (1) {
+ NodeBuilder builder;
if (!parser.HandleNextDocument(builder)) {
- break;
+ break;
}
- docs.push_back(builder.Root());
- }
-
- return docs;
-}
-
-std::vector<Node> LoadAllFromFile(const std::string& filename) {
- std::ifstream fin(filename.c_str());
+ docs.push_back(builder.Root());
+ }
+
+ return docs;
+}
+
+std::vector<Node> LoadAllFromFile(const std::string& filename) {
+ std::ifstream fin(filename.c_str());
if (!fin) {
- throw BadFile();
+ throw BadFile();
}
- return LoadAll(fin);
-}
+ return LoadAll(fin);
+}
} // namespace YAML