diff options
| author | dobrokot <[email protected]> | 2022-02-10 16:49:07 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:07 +0300 | 
| commit | 8d57b69dee81198a59c39e64704f7dc9f04b4fbf (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/xml/document | |
| parent | 25d83bf841d8b3ce3886525078f1964ac3c293c5 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/xml/document')
| -rw-r--r-- | library/cpp/xml/document/node-attr.h | 16 | ||||
| -rw-r--r-- | library/cpp/xml/document/xml-document-decl.h | 20 | 
2 files changed, 18 insertions, 18 deletions
| diff --git a/library/cpp/xml/document/node-attr.h b/library/cpp/xml/document/node-attr.h index 1d187573bb5..6e74403943c 100644 --- a/library/cpp/xml/document/node-attr.h +++ b/library/cpp/xml/document/node-attr.h @@ -1,12 +1,12 @@  #pragma once -#include "xml-document-decl.h"  +#include "xml-document-decl.h"  #include "libxml-guards.h"  #include <util/stream/str.h>  #include <util/string/cast.h>  namespace NXml { -#define THROW(x, y) ythrow yexception() << #x << ": " << y  +#define THROW(x, y) ythrow yexception() << #x << ": " << y      // libxml defines unsigned char -> xmlChar,      // and all functions use xmlChar. @@ -40,7 +40,7 @@ namespace NXml {          }          T t; -        AttrInternal(value, t, name);  +        AttrInternal(value, t, name);          return t;      } @@ -52,7 +52,7 @@ namespace NXml {          }          T t; -        AttrInternal(attr, t, name);  +        AttrInternal(attr, t, name);          return t;      } @@ -63,7 +63,7 @@ namespace NXml {              THROW(AttributeNotFound, Path() << name);          } -        AttrInternal(attr, value, name);  +        AttrInternal(attr, value, name);      }      template <class T> @@ -73,7 +73,7 @@ namespace NXml {          if (!attr) {              value = defvalue;          } else { -            AttrInternal(attr, value, name);  +            AttrInternal(attr, value, name);          }      } @@ -85,7 +85,7 @@ namespace NXml {          TCharPtr val(xmlNodeGetContent(NodePointer));          T t; -        AttrInternal(val, t, this->Name());  +        AttrInternal(val, t, this->Name());          return t;      } @@ -97,7 +97,7 @@ namespace NXml {          TCharPtr val(xmlNodeGetContent(NodePointer));          T t; -        AttrInternal(val, t, this->Name());  +        AttrInternal(val, t, this->Name());          return t;      } diff --git a/library/cpp/xml/document/xml-document-decl.h b/library/cpp/xml/document/xml-document-decl.h index db57ab1180e..bfda1fb7e6e 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);          } | 
