diff options
author | dobrokot <dobrokot@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
commit | 25d83bf841d8b3ce3886525078f1964ac3c293c5 (patch) | |
tree | bd52fa16c8dd727890b2ef9d87d1a402bd0d3a9a /library/cpp/xml/document/xml-document-decl.h | |
parent | 1d2e8a8e9976488ea69a7e4763aa749244f82612 (diff) | |
download | ydb-25d83bf841d8b3ce3886525078f1964ac3c293c5.tar.gz |
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/xml/document/xml-document-decl.h')
-rw-r--r-- | library/cpp/xml/document/xml-document-decl.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/xml/document/xml-document-decl.h b/library/cpp/xml/document/xml-document-decl.h index bfda1fb7e6..db57ab1180 100644 --- a/library/cpp/xml/document/xml-document-decl.h +++ b/library/cpp/xml/document/xml-document-decl.h @@ -4,8 +4,8 @@ #include <util/generic/string.h> #include <util/generic/vector.h> -#include <util/stream/output.h> -#include <util/stream/str.h> +#include <util/stream/output.h> +#include <util/stream/str.h> #include <algorithm> #include "libxml-guards.h" @@ -48,20 +48,20 @@ namespace NXml { TConstNode Root() const; void Save(IOutputStream& stream, TZtStringBuf enc = "", bool shouldFormat = true) const { - int bufferSize = 0; - xmlChar* xmlBuff = nullptr; + int bufferSize = 0; + xmlChar* xmlBuff = nullptr; const char* encoding = enc.size() ? enc.data() : Doc->encoding ? nullptr : "UTF-8"; xmlDocDumpFormatMemoryEnc(Doc.Get(), &xmlBuff, &bufferSize, encoding, shouldFormat); - TCharPtr xmlCharBuffPtr(xmlBuff); - stream.Write(xmlBuff, bufferSize); - } + TCharPtr xmlCharBuffPtr(xmlBuff); + stream.Write(xmlBuff, bufferSize); + } TString ToString(TZtStringBuf enc = "", bool shouldFormat = true) const { - TStringStream s; + TStringStream s; Save(s, enc, shouldFormat); return s.Str(); - } - + } + void Swap(TDocument& that) { std::swap(this->Doc, that.Doc); } |