From 840e906a4ddbbb32b8a5989e8a0ce10c8c374819 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 2 Mar 2021 17:23:41 -0500 Subject: add upstream 11.7 --- zenXml/zenxml/cvrt_text.h | 2 +- zenXml/zenxml/dom.h | 17 ++++++++--------- zenXml/zenxml/parser.h | 18 +++++++++--------- 3 files changed, 18 insertions(+), 19 deletions(-) (limited to 'zenXml/zenxml') diff --git a/zenXml/zenxml/cvrt_text.h b/zenXml/zenxml/cvrt_text.h index 51b23173..058ffa30 100644 --- a/zenXml/zenxml/cvrt_text.h +++ b/zenXml/zenxml/cvrt_text.h @@ -131,7 +131,7 @@ template struct GetTextType : std::integral_constant ? TEXT_TYPE_BOOL : IsStringLikeV ? TEXT_TYPE_STRING : //string before number to correctly handle char/wchar_t -> this was an issue with Loki only! - IsArithmetic::value ? TEXT_TYPE_NUMBER : // + IsArithmeticV ? TEXT_TYPE_NUMBER : // IsChronoDuration::value ? TEXT_TYPE_CHRONO : TEXT_TYPE_OTHER> {}; diff --git a/zenXml/zenxml/dom.h b/zenXml/zenxml/dom.h index cfbd14c9..e77509bf 100644 --- a/zenXml/zenxml/dom.h +++ b/zenXml/zenxml/dom.h @@ -85,7 +85,7 @@ public: it->second->value = std::move(attrValue); else { - auto itBack = attributes_.insert(attributes_.end(), { attrName, std::move(attrValue) }); + auto itBack = attributes_.insert(attributes_.end(), {attrName, std::move(attrValue)}); attributesSorted_.emplace(std::move(attrName), itBack); } } @@ -207,10 +207,10 @@ public: \endcode \return A pair of STL begin/end iterators to access all child elements sequentially. */ - std::pair getChildren() const { return { childElements_.begin(), childElements_.end() }; } + std::pair getChildren() const { return {childElements_.begin(), childElements_.end()}; } ///\sa getChildren - std::pair getChildren() { return { childElements_.begin(), childElements_.end() }; } + std::pair getChildren() { return {childElements_.begin(), childElements_.end()}; } ///Get parent XML element, may be nullptr for root element XmlElement* parent() { return parent_; } @@ -231,9 +231,8 @@ public: for (auto it = iterPair.first; it != iterPair.second; ++it) std::cout << "name: " << it->name << " value: " << it->value << '\n'; \endcode - \return A pair of STL begin/end iterators to access all attributes sequentially as a list of name/value pairs of std::string. - */ - std::pair getAttributes() const { return { attributes_.begin(), attributes_.end() }; } + \return A pair of STL begin/end iterators to access all attributes sequentially as a list of name/value pairs of std::string. */ + std::pair getAttributes() const { return {attributes_.begin(), attributes_.end()}; } //swap two elements while keeping references to parent. -> disabled documentation extraction void swapSubtree(XmlElement& other) noexcept @@ -329,11 +328,11 @@ private: XmlDoc (const XmlDoc&) = delete; //not implemented, thanks to XmlElement::parent_ XmlDoc& operator=(const XmlDoc&) = delete; - std::string version_ { "1.0" }; - std::string encoding_{ "utf-8" }; + std::string version_ {"1.0"}; + std::string encoding_{"utf-8"}; std::string standalone_; - XmlElement root_{ "Root" }; + XmlElement root_{"Root"}; }; } diff --git a/zenXml/zenxml/parser.h b/zenXml/zenxml/parser.h index 7ec2433b..a4800ab3 100644 --- a/zenXml/zenxml/parser.h +++ b/zenXml/zenxml/parser.h @@ -423,15 +423,15 @@ private: using TokenList = std::vector>; const TokenList tokens_ { - { "", Token::TK_DECL_END }, - { "", Token::TK_SLASH_GREATER }, - { "<", Token::TK_LESS }, //evaluate after TK_DECL_BEGIN! - { ">", Token::TK_GREATER }, - { "=", Token::TK_EQUAL }, - { "\"", Token::TK_QUOTE }, - { "\'", Token::TK_QUOTE }, + {"", Token::TK_DECL_END }, + {"", Token::TK_SLASH_GREATER}, + {"<", Token::TK_LESS }, //evaluate after TK_DECL_BEGIN! + {">", Token::TK_GREATER }, + {"=", Token::TK_EQUAL }, + {"\"", Token::TK_QUOTE }, + {"\'", Token::TK_QUOTE }, }; const std::string xmlCommentBegin_ = "