Loading src/html.cpp +6 −9 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <iostream> #include <cstdarg> #include <compare> #include <string_view> #include <algorithm> #include <fstream> Loading @@ -58,7 +59,7 @@ namespace libhtmlpp { const char *ContainerTypes[]={ const std::string_view ContainerTypes[]={ "div", "style", "span", Loading @@ -78,8 +79,7 @@ namespace libhtmlpp { "footer", "header", "main", "html", nullptr "html" }; class DocElements { Loading @@ -101,9 +101,6 @@ namespace libhtmlpp { }; }; libhtmlpp::HtmlString::HtmlString(){ } libhtmlpp::HtmlString::HtmlString(char str) : HtmlString(){ _Data.push_back(str); } Loading Loading @@ -277,7 +274,7 @@ void libhtmlpp::HtmlString::_buildtreenode( Element *prev_el_in_tree = nullptr; auto checkContainer = [&](const std::string &tag) { for (size_t i = 0; ContainerTypes[i]; ++i) { for (size_t i = 0; i<sizeof(ContainerTypes); ++i) { if (tag == ContainerTypes[i]) { return true; } Loading Loading @@ -1597,8 +1594,8 @@ void libhtmlpp::print(const Element &element, HtmlString &output,bool formated) const Element *el=&element; auto isContainer = [](const std::string &tagname) { for(int i=0; ContainerTypes[i]; ++i){ if(std::equal(tagname.begin(),tagname.end(),ContainerTypes[i])) for(int i=0; i<sizeof(ContainerTypes); ++i){ if(tagname==ContainerTypes[i]) return true; } return false; Loading src/html.h +1 −1 Original line number Diff line number Diff line Loading @@ -325,7 +325,7 @@ namespace libhtmlpp { using value_type = char; HtmlString(); HtmlString()=default; HtmlString(const HtmlString &str); HtmlString(char str); HtmlString(const std::string &str); Loading Loading
src/html.cpp +6 −9 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <iostream> #include <cstdarg> #include <compare> #include <string_view> #include <algorithm> #include <fstream> Loading @@ -58,7 +59,7 @@ namespace libhtmlpp { const char *ContainerTypes[]={ const std::string_view ContainerTypes[]={ "div", "style", "span", Loading @@ -78,8 +79,7 @@ namespace libhtmlpp { "footer", "header", "main", "html", nullptr "html" }; class DocElements { Loading @@ -101,9 +101,6 @@ namespace libhtmlpp { }; }; libhtmlpp::HtmlString::HtmlString(){ } libhtmlpp::HtmlString::HtmlString(char str) : HtmlString(){ _Data.push_back(str); } Loading Loading @@ -277,7 +274,7 @@ void libhtmlpp::HtmlString::_buildtreenode( Element *prev_el_in_tree = nullptr; auto checkContainer = [&](const std::string &tag) { for (size_t i = 0; ContainerTypes[i]; ++i) { for (size_t i = 0; i<sizeof(ContainerTypes); ++i) { if (tag == ContainerTypes[i]) { return true; } Loading Loading @@ -1597,8 +1594,8 @@ void libhtmlpp::print(const Element &element, HtmlString &output,bool formated) const Element *el=&element; auto isContainer = [](const std::string &tagname) { for(int i=0; ContainerTypes[i]; ++i){ if(std::equal(tagname.begin(),tagname.end(),ContainerTypes[i])) for(int i=0; i<sizeof(ContainerTypes); ++i){ if(tagname==ContainerTypes[i]) return true; } return false; Loading
src/html.h +1 −1 Original line number Diff line number Diff line Loading @@ -325,7 +325,7 @@ namespace libhtmlpp { using value_type = char; HtmlString(); HtmlString()=default; HtmlString(const HtmlString &str); HtmlString(char str); HtmlString(const std::string &str); Loading