Loading src/html.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -170,6 +170,12 @@ libhtmlpp::HtmlString & libhtmlpp::HtmlString::operator=(std::string *src){ return *this; } libhtmlpp::HtmlString& libhtmlpp::HtmlString::operator=(const libhtmlpp::HtmlString& src){ clear(); std::copy(src._Data.begin(),src._Data.end(),std::insert_iterator<std::vector<char>>(_Data,_Data.begin())); return *this; } const char libhtmlpp::HtmlString::operator[](size_t pos) const{ return _Data.at(pos); } Loading Loading @@ -699,6 +705,7 @@ NEWEL: cpylist.push(childel); } }else if(src->getType()==libhtmlpp::TextEl && dest->getType()== libhtmlpp::TextEl){ if(!(((TextElement*)src)->_Text).empty()) ((TextElement*)dest)->_Text=(((TextElement*)src)->_Text); } Loading Loading @@ -1171,8 +1178,8 @@ libhtmlpp::HtmlTable::HtmlTable(){ libhtmlpp::HtmlTable::~HtmlTable(){ Row *next=_firstRow,*curel=nullptr; while(next){ curel=next; next=next->_nextRow; next=curel->_nextRow; curel->_nextRow =nullptr; delete curel; } } Loading Loading @@ -1273,9 +1280,10 @@ libhtmlpp::HtmlTable::Row::Row(){ libhtmlpp::HtmlTable::Row::~Row(){ Column *cnext=_firstColumn,*ccurel=nullptr; while(cnext){ ccurel=cnext; cnext=cnext->_nextColumn; delete ccurel; ccurel=cnext->_nextColumn; cnext->_nextColumn=nullptr; delete cnext; cnext=ccurel; } } Loading src/html.h +1 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ namespace libhtmlpp { HtmlString& operator+=(HtmlString& hstring); HtmlString& operator=(const char* src); HtmlString& operator=(std::string *src); HtmlString& operator=(const HtmlString& src); const char operator[](size_t pos) const; HtmlString& operator<<(const char* src); Loading Loading
src/html.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -170,6 +170,12 @@ libhtmlpp::HtmlString & libhtmlpp::HtmlString::operator=(std::string *src){ return *this; } libhtmlpp::HtmlString& libhtmlpp::HtmlString::operator=(const libhtmlpp::HtmlString& src){ clear(); std::copy(src._Data.begin(),src._Data.end(),std::insert_iterator<std::vector<char>>(_Data,_Data.begin())); return *this; } const char libhtmlpp::HtmlString::operator[](size_t pos) const{ return _Data.at(pos); } Loading Loading @@ -699,6 +705,7 @@ NEWEL: cpylist.push(childel); } }else if(src->getType()==libhtmlpp::TextEl && dest->getType()== libhtmlpp::TextEl){ if(!(((TextElement*)src)->_Text).empty()) ((TextElement*)dest)->_Text=(((TextElement*)src)->_Text); } Loading Loading @@ -1171,8 +1178,8 @@ libhtmlpp::HtmlTable::HtmlTable(){ libhtmlpp::HtmlTable::~HtmlTable(){ Row *next=_firstRow,*curel=nullptr; while(next){ curel=next; next=next->_nextRow; next=curel->_nextRow; curel->_nextRow =nullptr; delete curel; } } Loading Loading @@ -1273,9 +1280,10 @@ libhtmlpp::HtmlTable::Row::Row(){ libhtmlpp::HtmlTable::Row::~Row(){ Column *cnext=_firstColumn,*ccurel=nullptr; while(cnext){ ccurel=cnext; cnext=cnext->_nextColumn; delete ccurel; ccurel=cnext->_nextColumn; cnext->_nextColumn=nullptr; delete cnext; cnext=ccurel; } } Loading
src/html.h +1 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ namespace libhtmlpp { HtmlString& operator+=(HtmlString& hstring); HtmlString& operator=(const char* src); HtmlString& operator=(std::string *src); HtmlString& operator=(const HtmlString& src); const char operator[](size_t pos) const; HtmlString& operator<<(const char* src); Loading