Commit 9ae2800c authored by jan.koester's avatar jan.koester
Browse files

some fixes

parent 099b9cf6
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -9,8 +9,7 @@
            "cmakeCommandArgs": "",
            "buildCommandArgs": "",
            "ctestCommandArgs": "",
            "inheritEnvironments": [ "msvc_x64_x64" ],
            "variables": []
            "inheritEnvironments": [ "msvc_x64_x64" ]
        },
        {
            "name": "x64-Debug",
@@ -22,7 +21,18 @@
            "buildCommandArgs": "",
            "ctestCommandArgs": "",
            "inheritEnvironments": [ "msvc_x64_x64" ],
            "variables": []
            "variables": [
                {
                    "name": "CMAKE_CXX_FLAGS",
                    "value": "/DWIN32 /D_WINDOWS /W3 /GR /EHsc /ZI",
                    "type": "STRING"
                },
                {
                    "name": "CMAKE_C_FLAGS",
                    "value": "/DWIN32 /D_WINDOWS /W3 /Zi",
                    "type": "STRING"
                }
            ]
        }
    ]
}
 No newline at end of file
+12 −4
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ libhtmlpp::HtmlString& libhtmlpp::HtmlString::operator=(const libhtmlpp::HtmlStr
    return *this;
}

const char libhtmlpp::HtmlString::operator[](size_t pos) const{
char libhtmlpp::HtmlString::operator[](size_t pos) const{
    return _Data.at(pos);
}

@@ -198,7 +198,7 @@ libhtmlpp::HtmlString& libhtmlpp::HtmlString::operator<<(unsigned int src) {
    return *this;
}

libhtmlpp::HtmlString& libhtmlpp::HtmlString::operator<<(unsigned long src) {
libhtmlpp::HtmlString& libhtmlpp::HtmlString::operator<<(size_t src) {
    char buf[255];
    snprintf(buf, 255, "%zu", src);
    append(buf);
@@ -210,7 +210,7 @@ libhtmlpp::HtmlString& libhtmlpp::HtmlString::operator<<(char src) {
    return *this;
}

const size_t libhtmlpp::HtmlString::size() const{
size_t libhtmlpp::HtmlString::size() const{
    return _Data.size();
}

@@ -825,7 +825,8 @@ namespace libhtmlpp {
            return;
        struct cpyel {
            cpyel(){

                destin = nullptr;
                source = nullptr;
            };

            cpyel(const cpyel &src){
@@ -1189,6 +1190,12 @@ void libhtmlpp::HtmlPage::_CheckHeader(const HtmlString &page){
    const char type[] = { '!','D','O','C','T','Y','P','E' };
    int i = 0;

    if (page.size() < 8) {
        HTMLException excp;
        excp[HTMLException::Critical] << "No Doctype found arborting";
        throw excp;
    }

    while (i < 8) {
        if (page[i+1] != type[i]) {
            HTMLException excp;
@@ -1428,6 +1435,7 @@ int libhtmlpp::HtmlElement::getType() const{
libhtmlpp::HtmlTable::HtmlTable(){
    _firstRow=nullptr;
    _lastRow=nullptr;
    _count = 0;
}

libhtmlpp::HtmlTable::~HtmlTable(){
+3 −3
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ namespace libhtmlpp {
        HtmlString& operator=(const char* src);
        HtmlString& operator=(const std::string *src);
        HtmlString& operator=(const HtmlString& src);
        const char  operator[](size_t pos) const;
        char  operator[](size_t pos) const;

        HtmlString& operator<<(const char* src);
        HtmlString& operator<<(std::string &src);
@@ -214,9 +214,9 @@ namespace libhtmlpp {
        HtmlString& operator<<(int src);
        HtmlString& operator<<(unsigned int src);
        HtmlString& operator<<(char src);
        HtmlString& operator<<(unsigned long src);
        HtmlString& operator<<(size_t src);

        const size_t        size() const;
        size_t              size() const;
        void                clear();
        bool                empty();
        const char *        c_str();