summaryrefslogtreecommitdiff
path: root/zenXml
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-03-02 17:23:41 -0500
committerB Stack <bgstack15@gmail.com>2021-03-02 17:23:41 -0500
commit840e906a4ddbbb32b8a5989e8a0ce10c8c374819 (patch)
tree6fb17404841b30822a2d9204e3e0932e55f05ebb /zenXml
parentMerge branch '11.6' into 'master' (diff)
downloadFreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.gz
FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.bz2
FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.zip
add upstream 11.7
Diffstat (limited to 'zenXml')
-rw-r--r--zenXml/zenxml/cvrt_text.h2
-rw-r--r--zenXml/zenxml/dom.h17
-rw-r--r--zenXml/zenxml/parser.h18
3 files changed, 18 insertions, 19 deletions
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 <class T>
struct GetTextType : std::integral_constant<TextType,
std::is_same_v<T, bool> ? TEXT_TYPE_BOOL :
IsStringLikeV<T> ? TEXT_TYPE_STRING : //string before number to correctly handle char/wchar_t -> this was an issue with Loki only!
- IsArithmetic<T>::value ? TEXT_TYPE_NUMBER : //
+ IsArithmeticV<T> ? TEXT_TYPE_NUMBER : //
IsChronoDuration<T>::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<ChildIterConst, ChildIterConst> getChildren() const { return { childElements_.begin(), childElements_.end() }; }
+ std::pair<ChildIterConst, ChildIterConst> getChildren() const { return {childElements_.begin(), childElements_.end()}; }
///\sa getChildren
- std::pair<ChildIter, ChildIter> getChildren() { return { childElements_.begin(), childElements_.end() }; }
+ std::pair<ChildIter, ChildIter> 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<AttrIter, AttrIter> 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<AttrIter, AttrIter> 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<std::pair<std::string, Token::Type>>;
const TokenList tokens_
{
- { "<?xml", Token::TK_DECL_BEGIN },
- { "?>", Token::TK_DECL_END },
- { "</", Token::TK_LESS_SLASH },
- { "/>", Token::TK_SLASH_GREATER },
- { "<", Token::TK_LESS }, //evaluate after TK_DECL_BEGIN!
- { ">", Token::TK_GREATER },
- { "=", Token::TK_EQUAL },
- { "\"", Token::TK_QUOTE },
- { "\'", Token::TK_QUOTE },
+ {"<?xml", Token::TK_DECL_BEGIN },
+ {"?>", Token::TK_DECL_END },
+ {"</", Token::TK_LESS_SLASH },
+ {"/>", 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_ = "<!--";
bgstack15