aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yaml/as/tstring.h
diff options
context:
space:
mode:
authorAndrey Rogozhnikov <rogozhnikov.andrey@gmail.com>2022-02-10 16:50:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:02 +0300
commit3a00a7f47463f54c5c60c205eac7ab320572e930 (patch)
tree0f08391e08096f2fff528bae4b01b38eeffdb65f /library/cpp/yaml/as/tstring.h
parent5f76ab5b18e12d75f0c861e68d730c37e347b965 (diff)
downloadydb-3a00a7f47463f54c5c60c205eac7ab320572e930.tar.gz
Restoring authorship annotation for Andrey Rogozhnikov <rogozhnikov.andrey@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yaml/as/tstring.h')
-rw-r--r--library/cpp/yaml/as/tstring.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/yaml/as/tstring.h b/library/cpp/yaml/as/tstring.h
index 1037e46706..454bcb336c 100644
--- a/library/cpp/yaml/as/tstring.h
+++ b/library/cpp/yaml/as/tstring.h
@@ -1,27 +1,27 @@
-#pragma once
-
-#include <contrib/libs/yaml-cpp/include/yaml-cpp/yaml.h>
-
-#include <util/generic/string.h>
-
-namespace YAML {
- template <>
- inline TString Node::as<TString>() const {
- const auto& converted = as<std::string>();
- return TString(converted.c_str(), converted.size());
- }
-
- template <>
- struct convert<TString> {
- static Node encode(const TString& rhs) {
- return Node(std::string(rhs));
- }
-
- static bool decode(const Node& node, TString& rhs) {
- if (!node.IsScalar())
- return false;
- rhs = node.Scalar();
- return true;
- }
- };
-}
+#pragma once
+
+#include <contrib/libs/yaml-cpp/include/yaml-cpp/yaml.h>
+
+#include <util/generic/string.h>
+
+namespace YAML {
+ template <>
+ inline TString Node::as<TString>() const {
+ const auto& converted = as<std::string>();
+ return TString(converted.c_str(), converted.size());
+ }
+
+ template <>
+ struct convert<TString> {
+ static Node encode(const TString& rhs) {
+ return Node(std::string(rhs));
+ }
+
+ static bool decode(const Node& node, TString& rhs) {
+ if (!node.IsScalar())
+ return false;
+ rhs = node.Scalar();
+ return true;
+ }
+ };
+}